結果

問題 No.1476 esreveR dna esreveR
ユーザー shigeokushigeoku
提出日時 2021-04-16 20:44:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 228 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 10,544 KB
実行使用メモリ 12,084 KB
最終ジャッジ日時 2023-09-15 21:49:45
合計ジャッジ時間 3,555 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,084 KB
testcase_01 AC 15 ms
7,776 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

N = int(input())

def pow_r(x, n):
    if n == 0:
        return 1
    if n % 2 == 0:
        return pow_r(x**2, n//2) % 998244353
    else:
        return x * pow_r(x**2, (n-1)//2) % 998244353

print(pow_r(6, N//2))
0