結果

問題 No.251 大きな桁の復習問題(1)
ユーザー SalmonizeSalmonize
提出日時 2019-04-03 23:41:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 240 bytes
コンパイル時間 580 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 259,208 KB
最終ジャッジ日時 2023-08-25 01:41:20
合計ジャッジ時間 10,401 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 16 ms
8,116 KB
testcase_03 AC 16 ms
8,160 KB
testcase_04 AC 15 ms
8,064 KB
testcase_05 AC 15 ms
7,876 KB
testcase_06 AC 16 ms
7,768 KB
testcase_07 AC 15 ms
7,772 KB
testcase_08 AC 15 ms
7,812 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,072 KB
testcase_21 AC 16 ms
7,800 KB
testcase_22 AC 15 ms
7,772 KB
testcase_23 AC 15 ms
7,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(10**6)
n = int(input())
m = int(input())
mod = 129402307
def pow2(x,y):
    if y == 1:
        return x%mod
    elif y%2 == 0:
        return pow2(x,y//2)**2%mod
    return pow2(x,y-1)*x%mod
print(pow2(n,m))
0