結果

問題 No.251 大きな桁の復習問題(1)
ユーザー TawaraTawara
提出日時 2015-08-01 14:05:27
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 2,702 ms / 5,000 ms
コード長 197 bytes
コンパイル時間 2,063 ms
コンパイル使用メモリ 77,596 KB
実行使用メモリ 79,992 KB
最終ジャッジ日時 2023-08-22 17:04:07
合計ジャッジ時間 33,238 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,400 KB
testcase_01 AC 73 ms
76,580 KB
testcase_02 AC 76 ms
76,276 KB
testcase_03 AC 73 ms
76,552 KB
testcase_04 AC 72 ms
76,568 KB
testcase_05 AC 70 ms
76,472 KB
testcase_06 AC 72 ms
76,372 KB
testcase_07 AC 70 ms
76,400 KB
testcase_08 AC 71 ms
76,788 KB
testcase_09 AC 2,678 ms
79,560 KB
testcase_10 AC 2,610 ms
79,992 KB
testcase_11 AC 2,608 ms
79,724 KB
testcase_12 AC 2,631 ms
79,688 KB
testcase_13 AC 2,702 ms
79,792 KB
testcase_14 AC 2,624 ms
79,580 KB
testcase_15 AC 2,635 ms
79,840 KB
testcase_16 AC 2,608 ms
79,788 KB
testcase_17 AC 2,652 ms
79,940 KB
testcase_18 AC 2,668 ms
79,816 KB
testcase_19 AC 2,665 ms
79,548 KB
testcase_20 AC 72 ms
76,336 KB
testcase_21 AC 72 ms
76,512 KB
testcase_22 AC 71 ms
76,336 KB
testcase_23 AC 73 ms
76,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import log
N = int(raw_input())
M = int(raw_input())
p = 129402307
N %= p
ans = 1
if M > 0:
	for i in xrange(int(log(M,2))+1):
		if (M>>i)&1:
			ans = ans * N % p
		N = N**2 % p
print ans
0