总题解:http://www.nike0good.com/674.html
1001:
2017ACM/ICPC广西邀请赛-重现赛 1001 A Math Problem
#include <iostream> #include <cstdio> #define ull unsigned long long using namespace std; ull fac[17]; void fuc() { for(int i=1;i<=15;i++) { ull x=1; for(int j=1;j<=i;j++) x*=i; fac[i]=x; } } int main() { fuc(); ull n; int ans=-1; while(scanf("%llu",&n)!=EOF) { for(int i=1;i<=15;i++) { if(fac[i]>n) { ans=i-1; break; } if(fac[i]==n) { ans=i; break; } } if(ans==-1) ans=15; printf("%d ",ans); } return 0; }
E:广西2017邀请赛 Problem E CS Course
2017广西邀请赛CS Course(&|^位运算模拟)
Build A tree :http://blog.csdn.net/my_sunshine26/article/details/77750130