結果

問題 No.251 大きな桁の復習問題(1)
ユーザー lloyzlloyz
提出日時 2023-05-04 00:07:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 374 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 85,248 KB
最終ジャッジ日時 2024-05-01 17:21:10
合計ジャッジ時間 2,963 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,352 KB
testcase_01 WA -
testcase_02 AC 36 ms
51,840 KB
testcase_03 AC 36 ms
51,968 KB
testcase_04 AC 39 ms
51,712 KB
testcase_05 AC 34 ms
51,968 KB
testcase_06 AC 35 ms
51,968 KB
testcase_07 AC 36 ms
52,096 KB
testcase_08 AC 36 ms
52,096 KB
testcase_09 AC 141 ms
84,992 KB
testcase_10 AC 140 ms
84,992 KB
testcase_11 AC 138 ms
85,120 KB
testcase_12 AC 141 ms
85,120 KB
testcase_13 AC 150 ms
85,120 KB
testcase_14 AC 149 ms
84,992 KB
testcase_15 AC 144 ms
85,248 KB
testcase_16 AC 144 ms
85,120 KB
testcase_17 AC 140 ms
85,120 KB
testcase_18 AC 142 ms
85,248 KB
testcase_19 AC 142 ms
85,120 KB
testcase_20 AC 38 ms
52,224 KB
testcase_21 AC 36 ms
51,712 KB
testcase_22 AC 37 ms
51,968 KB
testcase_23 AC 37 ms
51,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = list(map(int, list(input())))
M = list(map(int, list(input())))
mod = 129402307

n = 0
d = len(N)
for i in range(d):
    n += N[i] * pow(10, d - i - 1, mod) % mod
    n %= mod
m = 0
dd = len(M)
for i in range(dd):
    m += M[i] * pow(10, dd - i - 1, mod - 1) % (mod - 1)
    m %= mod - 1
if n == 0:
    print(0)
elif m == 0:
    print(1)
else:
    print(pow(n, m, mod))
0