結果
問題 | No.1476 esreveR dna esreveR |
ユーザー |
![]() |
提出日時 | 2021-04-16 20:09:54 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 335 bytes |
コンパイル時間 | 589 ms |
コンパイル使用メモリ | 63,616 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 22:01:35 |
合計ジャッジ時間 | 1,005 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 6 |
ソースコード
#include <iostream>#define int long longusing namespace std;int powmod(int a, int n, int mod) {if (n == 0) return 1;if (n % 2 == 1) return a * powmod(a, n - 1, mod) % mod;return powmod((a * a) % mod, n / 2, mod);}int mod = 998244353;signed main() {int n;cin >> n;cout << powmod(6, n / 2, mod) << endl;return 0;}