結果
問題 | No.1476 esreveR dna esreveR |
ユーザー | kappybar |
提出日時 | 2021-04-16 22:10:13 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 744 bytes |
コンパイル時間 | 1,366 ms |
コンパイル使用メモリ | 163,432 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-16 00:54:33 |
合計ジャッジ時間 | 1,892 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 2 ms
4,376 KB |
testcase_06 | AC | 2 ms
4,376 KB |
testcase_07 | AC | 2 ms
4,376 KB |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);i++) #define chmin(x,y) x = min((x),(y)) #define chmax(x,y) x = max((x),(y)) #define popcount(x) __builtin_popcount(x) using namespace std; using ll = long long ; using P = pair<int,int> ; using pll = pair<long long,long long>; const int INF = 1e9; const long long LINF = 1e17; //const int MOD = 1000000007; const int MOD = 998244353; const double PI = 3.14159265358979323846; long long modpow(long long x, long long n,long long m) { long long ret = 1; while (n > 0) { if (n & 1) ret = (ret * x) % m; x = (x * x) % m; n >>= 1; } return ret; } int main(){ ll n; cin >> n; cout << modpow(6,n/2,MOD) << endl; return 0; }