結果

問題 No.251 大きな桁の復習問題(1)
ユーザー qibqib
提出日時 2023-03-30 15:36:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 302 bytes
コンパイル時間 1,646 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 85,512 KB
最終ジャッジ日時 2023-10-22 01:45:39
合計ジャッジ時間 2,535 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,444 KB
testcase_01 AC 33 ms
53,444 KB
testcase_02 AC 33 ms
53,444 KB
testcase_03 AC 34 ms
53,444 KB
testcase_04 WA -
testcase_05 AC 32 ms
53,444 KB
testcase_06 WA -
testcase_07 AC 41 ms
53,444 KB
testcase_08 AC 40 ms
53,444 KB
testcase_09 AC 69 ms
85,512 KB
testcase_10 AC 57 ms
85,512 KB
testcase_11 AC 57 ms
85,512 KB
testcase_12 AC 71 ms
85,512 KB
testcase_13 AC 61 ms
85,512 KB
testcase_14 AC 68 ms
85,512 KB
testcase_15 AC 69 ms
85,512 KB
testcase_16 AC 62 ms
85,512 KB
testcase_17 AC 65 ms
85,512 KB
testcase_18 AC 59 ms
85,512 KB
testcase_19 AC 61 ms
85,512 KB
testcase_20 AC 33 ms
53,444 KB
testcase_21 AC 32 ms
53,444 KB
testcase_22 AC 39 ms
53,444 KB
testcase_23 AC 36 ms
53,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 129402307

n = list(map(int, list(input())))
m = list(map(int, list(input())))

s = len(n)
t = len(m)

x = 0
for i in range(s):
  x = (x * 10 + n[i]) % MOD

y = 0
for i in range(t):
  y = (y * 10 + m[i]) % (MOD - 1)

if y == 0:
  print("1")
elif x == 0:
  print("0")
else:
  print(pow(x, y, MOD))
0