結果

問題 No.251 大きな桁の復習問題(1)
ユーザー H3PO4H3PO4
提出日時 2023-06-17 20:30:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 136 ms / 5,000 ms
コード長 238 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 8,456 KB
最終ジャッジ日時 2023-09-07 16:27:37
合計ジャッジ時間 2,970 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,860 KB
testcase_01 AC 16 ms
7,864 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 AC 17 ms
7,932 KB
testcase_04 AC 17 ms
7,832 KB
testcase_05 AC 16 ms
7,888 KB
testcase_06 AC 15 ms
7,848 KB
testcase_07 AC 15 ms
7,880 KB
testcase_08 AC 15 ms
7,836 KB
testcase_09 AC 133 ms
8,456 KB
testcase_10 AC 136 ms
8,388 KB
testcase_11 AC 132 ms
8,364 KB
testcase_12 AC 132 ms
8,320 KB
testcase_13 AC 133 ms
8,280 KB
testcase_14 AC 133 ms
8,308 KB
testcase_15 AC 134 ms
8,356 KB
testcase_16 AC 134 ms
8,432 KB
testcase_17 AC 133 ms
8,452 KB
testcase_18 AC 132 ms
8,324 KB
testcase_19 AC 134 ms
8,376 KB
testcase_20 AC 15 ms
7,872 KB
testcase_21 AC 15 ms
7,868 KB
testcase_22 AC 15 ms
7,820 KB
testcase_23 AC 15 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.set_int_max_str_digits(10 ** 6)
input = sys.stdin.buffer.readline

N = int(input())
M = int(input())
MOD = 129402307
if Nmod := N % MOD:
    print(pow(Nmod, M % (MOD - 1), MOD))
elif M == 0:
    print(1)
else:
    print(0)
0