結果

問題 No.251 大きな桁の復習問題(1)
ユーザー qibqib
提出日時 2023-03-30 16:00:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 81,724 KB
実行使用メモリ 85,504 KB
最終ジャッジ日時 2023-10-22 02:03:41
合計ジャッジ時間 2,470 ms
ジャッジサーバーID
(参考情報)
judge14 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

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