結果
問題 | No.1476 esreveR dna esreveR |
ユーザー | akane |
提出日時 | 2021-04-16 20:18:58 |
言語 | C++17 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 581 bytes |
コンパイル時間 | 2,166 ms |
コンパイル使用メモリ | 198,104 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-15 20:44:02 |
合計ジャッジ時間 | 2,783 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 2 ms
4,376 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 2 ms
4,380 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 < (n); i++) using namespace std; using ll = long long; ll mod=998244353; long long modpow(long long x, long long n) { long long ret = 1; while (n > 0) { if (n & 1) ret *= x; // n の最下位bitが 1 ならば x^(2^i) をかける x *= x; x %= mod; ret %= mod; n >>= 1; // n を1bit 左にずらす } return ret; } int main(){ ios::sync_with_stdio(false); ll N; cin>>N; ll num = N/2; ll ans=1; ans = modpow(6,num); cout << ans << endl; }