记录编号 279301 评测结果 AAAAAAAAAA
题目名称 [雅礼内测] 平方 最终得分 100
用户昵称 GravatarAntiLeaf 是否通过 通过
代码语言 C++ 运行时间 0.000 s
提交时间 2016-07-09 06:25:04 内存使用 0.00 MiB
显示代码纯文本
  1. #include<cstdio>
  2. #include<cstring>
  3. #include<cmath>
  4. #include<algorithm>
  5. #define squa(x) ((x)*(x))
  6. using namespace std;
  7. long long n,y=1;
  8. inline int MAIN(){
  9. #define MINE
  10. #ifdef MINE
  11. freopen("sqrt.in","r",stdin);
  12. freopen("sqrt.out","w",stdout);
  13. #endif
  14. scanf("%lld",&n);
  15. y=n;
  16. for(long long i=(long long)sqrt(n);i;i--)
  17. if(y%squa(i)==0)y/=squa(i);
  18. printf("%lld",n+y+(((long long)sqrt(n*y))<<1));
  19. return 0;
  20. }
  21. int main(){;}
  22. int hzoier=MAIN();