#include <bits/stdc++.h>
using namespace std;
#define wzx sb
int a[20]={0,2,3,5,7,11,13,17,19,23};
typedef unsigned long long ll;
ll ans,cnt,d,ans_p,d_p;
void Solve(){
int n;scanf("%d",&n);
for(register int i1=1;i1<=31;++i1){
ans1=d=1;
for(int j1=1;j1<=i1;++j1) ans1*=a[1];
if(ans1>n) break;
d*=(i1+1);
printf("i1=%d ans1=%lld d=%lld
",i1,ans1,d);
if(d>d_p||(d==d_p&&ans1<ans_p))d_p=d,ans_p=ans1;
for(register int i2=1;i2<=i1;++i2){
ans2=ans1;
for(int j2=1;j2<=i2;++j2) ans2*=a[2];
if(ans2>n) break;
d*=(i2+1);
if(d>d_p||(d==d_p&&ans2<ans_p))d_p=d,ans_p=ans2;
printf("i2=%d ans=%lld d=%lld
",i2,ans,d);
for(register int i3=1;i3<=i2;++i3){
ans3=ans2;
for(int j3=1;j3<=i3;++j3) ans3*=a[3];
if(ans3>n) break;
d*=(i3+1);
if(d>d_p||(d==d_p&&ans3<ans_p))d_p=d,ans_p=ans3;
printf("i3=%d ans=%lld d=%lld
",i3,ans,d);
for(register int i4=1;i4<=i3;++i4){
for(int j4=1;j4<=i4;++j4)ans*=a[4];
if(ans>n) break;
d*=(i4+1);
if(d>d_p||(d==d_p&&ans<ans_p))d_p=d,ans_p=ans;
printf("i4=%d ans=%lld d=%lld
",i4,ans,d);
for(register int i5=1;i5<=i4;++i5){
for(int j5=1;j5<=i5;++j5)ans*=a[5];
if(ans>n) break;
d*=(i5+1);
if(d>d_p||(d==d_p&&ans<ans_p))d_p=d,ans_p=ans;
printf("i5=%d ans=%lld d=%lld
",i5,ans,d);
for(register int i6=1;i6<=i5;++i6){
for(int j6=1;j6<=i6;++j6)ans*=a[6];
if(ans>n) break;
d*=(i6+1);
if(d>d_p||(d==d_p&&ans<ans_p))d_p=d,ans_p=ans;
printf("i6=%d ans=%lld d=%lld
",i6,ans,d);
for(register int i7=1;i7<=i6;++i7){
for(int j7=1;j7<=i7;++j7)ans*=a[7];
if(ans>n) break;
d*=(i7+1);
if(d>d_p||(d==d_p&&ans<ans_p))d_p=d,ans_p=ans;
printf("i7=%d ans=%lld d=%lld
",i7,ans,d);
for(register int i8=1;i8<=i7;++i8){
for(int j8=1;j8<=i8;++j8)ans*=a[8];
if(ans>n) break;
d*=(i8+1);
if(d>d_p||(d==d_p&&ans<ans_p))d_p=d,ans_p=ans;
printf("i8=%d ans=%lld d=%lld
",i8,ans,d);
for(register int i9=1;i9<=i8;++i9){
for(int j9=1;j9<=i9;++j9)ans*=a[9];
if(ans>n) break;
d*=(i9+1);
if(d>d_p||(d==d_p&&ans<ans_p))d_p=d,ans_p=ans;
printf("i9=%d ans=%lld d=%lld
",i9,ans,d);
}
}
}
}
}
}
}
}
}
printf("%llu",ans_p);
}
int main(){
Solve();
return 0;
}
30号T3的阴间写法。快调出来了,这份代码有人接盘吗