結果

問題 No.251 大きな桁の復習問題(1)
ユーザー nola_suznola_suz
提出日時 2015-07-29 13:19:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 169 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,604 KB
実行使用メモリ 8,340 KB
最終ジャッジ日時 2023-09-24 21:35:21
合計ジャッジ時間 1,736 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,780 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 16 ms
8,052 KB
testcase_05 AC 16 ms
8,048 KB
testcase_06 AC 16 ms
8,184 KB
testcase_07 AC 16 ms
8,160 KB
testcase_08 AC 15 ms
8,184 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 AC 16 ms
8,048 KB
testcase_21 AC 16 ms
7,808 KB
testcase_22 AC 16 ms
7,740 KB
testcase_23 AC 16 ms
7,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
a = int(input())
b = int(input())
MOD=129402307
a=a%MOD
if a==0 :
	print(0)
	sys.exit()
x=1
while(b):
	if b%2==1:
		x=x*a%MOD
	a=a*a%MOD
	b=int(b/2)

print(x)
0