记录编号 202574 评测结果 WWWAAAAWWW
题目名称 [SYOI 2015] Asm_Def三角形 最终得分 40
用户昵称 Gravatarpppoooiiizzy 是否通过 未通过
代码语言 C++ 运行时间 0.035 s
提交时间 2015-11-01 14:36:08 内存使用 0.28 MiB
显示代码纯文本
  1. #include<iostream>
  2. #include<cstdio>
  3. #include<cmath>
  4. #define LL long long
  5. using namespace std;
  6.  
  7. LL n,m,k,x;
  8.  
  9. LL pow_mod(LL a, LL n, LL m) {
  10. if( n == 0) return 1;
  11. LL x = pow_mod( a, n/2, m);
  12. long long ans = (long long)x * x % m;
  13. if( n % 2 == 1) ans = ans * a % m;
  14. return ans;
  15. }
  16.  
  17. int main()
  18. {
  19. freopen("tria.in", "r", stdin);
  20. freopen("tria.out", "w", stdout);
  21. LL a, q;
  22. cin>>a;
  23. cout<<pow_mod(2, a - 1, 998244353);
  24. /*cin>>n>>m>>k>>x;
  25. int temp = ( ( m % n) * (pow_mod ( 10, k, n) ) + x % n) % n;
  26. cout<<temp<<endl;*/
  27. return 0;
  28. }