結果

問題 No.251 大きな桁の復習問題(1)
ユーザー yaoshimaxyaoshimax
提出日時 2016-05-08 00:54:42
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 2,428 ms / 5,000 ms
コード長 169 bytes
コンパイル時間 570 ms
コンパイル使用メモリ 77,584 KB
実行使用メモリ 87,680 KB
最終ジャッジ日時 2023-08-22 17:12:06
合計ジャッジ時間 28,302 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,152 KB
testcase_01 AC 77 ms
76,244 KB
testcase_02 AC 73 ms
76,240 KB
testcase_03 AC 78 ms
76,536 KB
testcase_04 AC 73 ms
76,248 KB
testcase_05 AC 76 ms
76,404 KB
testcase_06 AC 74 ms
76,376 KB
testcase_07 AC 76 ms
76,288 KB
testcase_08 AC 74 ms
76,148 KB
testcase_09 AC 2,393 ms
87,348 KB
testcase_10 AC 2,273 ms
87,596 KB
testcase_11 AC 2,428 ms
87,580 KB
testcase_12 AC 2,177 ms
87,332 KB
testcase_13 AC 2,348 ms
87,540 KB
testcase_14 AC 2,394 ms
87,580 KB
testcase_15 AC 2,222 ms
87,664 KB
testcase_16 AC 2,176 ms
87,520 KB
testcase_17 AC 2,281 ms
87,568 KB
testcase_18 AC 2,268 ms
87,364 KB
testcase_19 AC 2,268 ms
87,680 KB
testcase_20 AC 73 ms
76,384 KB
testcase_21 AC 74 ms
76,692 KB
testcase_22 AC 74 ms
76,440 KB
testcase_23 AC 75 ms
76,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(raw_input())
M=int(raw_input())
ans=1
mul=N
mod=129402307
while M>0:
    if M%2==1:
        ans*=mul
        ans%=mod
    mul*=mul
    mul%=mod
    M/=2
print ans
0