提交时间:2023-11-25 11:06:57

运行 ID: 112246

#include<bits/stdc++.h> using namespace std; long 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; if(n==6)s2=9; cout<<max(s1,s2); }