結果

問題 No.1476 esreveR dna esreveR
ユーザー kohei2019kohei2019
提出日時 2023-06-22 23:01:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 457 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 71,568 KB
最終ジャッジ日時 2023-09-12 17:19:30
合計ジャッジ時間 1,935 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,376 KB
testcase_01 AC 70 ms
71,568 KB
testcase_02 AC 71 ms
71,308 KB
testcase_03 AC 72 ms
71,108 KB
testcase_04 AC 71 ms
71,276 KB
testcase_05 AC 70 ms
71,232 KB
testcase_06 AC 71 ms
71,456 KB
testcase_07 AC 69 ms
71,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def modPow(a,n,mod):#繰り返し二乗法 a**n % mod
    if n==0:
        return 1
    if n==1:
        return a%mod
    if n & 1:
        return (a*modPow(a,n-1,mod)) % mod
    t = modPow(a,n>>1,mod)
    return (t*t)%mod
N = int(input())
mod = 998244353
s = 4*3//2
ans = modPow(s,(N//2),mod)
print(ans)
0