提交时间:2023-11-25 17:03:20

运行 ID: 112341

#include<bits/stdc++.h> #define int long long using namespace std; int ans; signed main(){ int n; cin>>n; for (int i = 2;i <= n;i++){ int x = n / i; int y = n % i; ans = max(ans,(long long)(pow(x,i - y) * pow(x + 1,y))); } cout<<ans; return 0; }