显示代码纯文本
- #include<iostream>
- #include<cstdio>
- #include<cmath>
- #define LL long long
- using namespace std;
-
- LL n,m,k,x;
-
- LL pow_mod(LL a, LL n, LL m) {
- if( n == 0) return 1;
- LL x = pow_mod( a, n/2, m);
- long long ans = (long long)x * x % m;
- if( n % 2 == 1) ans = ans * a % m;
- return ans;
- }
-
- int main()
- {
- freopen("tria.in", "r", stdin);
- freopen("tria.out", "w", stdout);
- LL a, q;
- cin>>a;
- cout<<pow_mod(2, a - 1, 998244353);
- /*cin>>n>>m>>k>>x;
- int temp = ( ( m % n) * (pow_mod ( 10, k, n) ) + x % n) % n;
- cout<<temp<<endl;*/
- return 0;
- }