結果

問題 No.251 大きな桁の復習問題(1)
ユーザー lloyzlloyz
提出日時 2023-05-04 00:06:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 348 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 82,388 KB
実行使用メモリ 85,632 KB
最終ジャッジ日時 2024-05-01 17:20:54
合計ジャッジ時間 3,909 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,712 KB
testcase_01 WA -
testcase_02 AC 41 ms
52,096 KB
testcase_03 AC 39 ms
51,712 KB
testcase_04 AC 40 ms
52,096 KB
testcase_05 AC 41 ms
51,840 KB
testcase_06 AC 41 ms
51,968 KB
testcase_07 AC 41 ms
51,712 KB
testcase_08 AC 41 ms
51,584 KB
testcase_09 AC 153 ms
85,120 KB
testcase_10 AC 150 ms
85,120 KB
testcase_11 AC 150 ms
85,376 KB
testcase_12 AC 150 ms
85,376 KB
testcase_13 AC 150 ms
84,992 KB
testcase_14 AC 148 ms
85,376 KB
testcase_15 AC 149 ms
84,992 KB
testcase_16 AC 148 ms
85,632 KB
testcase_17 AC 149 ms
85,376 KB
testcase_18 AC 152 ms
84,992 KB
testcase_19 AC 149 ms
85,632 KB
testcase_20 AC 40 ms
52,480 KB
testcase_21 AC 40 ms
51,968 KB
testcase_22 AC 41 ms
51,584 KB
testcase_23 AC 41 ms
52,096 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)
else:
    print(pow(n, m, mod))
0