結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,712 KB
testcase_01 AC 40 ms
51,708 KB
testcase_02 AC 39 ms
51,728 KB
testcase_03 AC 40 ms
51,732 KB
testcase_04 WA -
testcase_05 AC 40 ms
51,700 KB
testcase_06 WA -
testcase_07 AC 40 ms
51,704 KB
testcase_08 AC 40 ms
51,704 KB
testcase_09 AC 108 ms
83,636 KB
testcase_10 AC 72 ms
85,268 KB
testcase_11 AC 71 ms
85,272 KB
testcase_12 AC 71 ms
83,644 KB
testcase_13 AC 59 ms
83,640 KB
testcase_14 AC 59 ms
83,644 KB
testcase_15 AC 59 ms
83,648 KB
testcase_16 AC 60 ms
83,644 KB
testcase_17 AC 58 ms
83,644 KB
testcase_18 AC 61 ms
83,644 KB
testcase_19 AC 63 ms
83,636 KB
testcase_20 AC 36 ms
51,736 KB
testcase_21 AC 34 ms
51,700 KB
testcase_22 AC 36 ms
51,708 KB
testcase_23 AC 38 ms
51,712 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 == 0:
  if y == 0:
    print("1")
  else:
    print("0")
elif y == 0:
  print("1")
else:
	print(pow(x, y, MOD))
0