提交时间:2023-11-25 11:01:09
运行 ID: 112215
#include<bits/stdc++.h> using namespace std; long n,a,b,c,s1,s2; int main() { cin>>n; a=sqrt(n); b=n/a-1; c=n-a*b; s1=pow(a,b)*c; a=sqrt(n)+1; b=n/a; c=n-a*b; s2=pow(a,b)*c; cout<<max(s1,s2); }