結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,356 KB
testcase_01 WA -
testcase_02 AC 34 ms
53,356 KB
testcase_03 AC 33 ms
53,356 KB
testcase_04 AC 34 ms
53,356 KB
testcase_05 AC 33 ms
53,356 KB
testcase_06 AC 35 ms
53,356 KB
testcase_07 AC 35 ms
53,356 KB
testcase_08 AC 35 ms
53,356 KB
testcase_09 AC 57 ms
85,412 KB
testcase_10 AC 58 ms
85,412 KB
testcase_11 AC 59 ms
85,412 KB
testcase_12 AC 59 ms
85,412 KB
testcase_13 AC 58 ms
85,412 KB
testcase_14 AC 57 ms
85,412 KB
testcase_15 AC 59 ms
85,412 KB
testcase_16 AC 58 ms
85,412 KB
testcase_17 AC 59 ms
85,412 KB
testcase_18 AC 59 ms
85,412 KB
testcase_19 AC 59 ms
85,412 KB
testcase_20 AC 34 ms
53,356 KB
testcase_21 AC 34 ms
53,356 KB
testcase_22 AC 33 ms
53,356 KB
testcase_23 AC 34 ms
53,356 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 x == 1:
  print("1")
elif x == 0:
  print("0")
elif y == 0:
  print("1")
else:
  print(pow(x, y, MOD))
0