結果

問題 No.403 2^2^2
ユーザー rlangevinrlangevin
提出日時 2023-07-27 12:33:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 193 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 82,572 KB
実行使用メモリ 53,940 KB
最終ジャッジ日時 2024-04-15 00:42:25
合計ジャッジ時間 2,326 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,568 KB
testcase_01 AC 38 ms
52,068 KB
testcase_02 AC 39 ms
53,148 KB
testcase_03 AC 39 ms
52,688 KB
testcase_04 AC 36 ms
52,560 KB
testcase_05 AC 36 ms
53,020 KB
testcase_06 AC 36 ms
51,752 KB
testcase_07 AC 38 ms
52,988 KB
testcase_08 AC 38 ms
52,944 KB
testcase_09 AC 37 ms
53,008 KB
testcase_10 AC 37 ms
51,880 KB
testcase_11 AC 37 ms
53,292 KB
testcase_12 AC 37 ms
52,200 KB
testcase_13 AC 37 ms
52,472 KB
testcase_14 AC 39 ms
52,684 KB
testcase_15 AC 39 ms
53,940 KB
testcase_16 AC 38 ms
52,912 KB
testcase_17 AC 38 ms
52,560 KB
testcase_18 AC 39 ms
52,616 KB
testcase_19 AC 38 ms
52,012 KB
testcase_20 AC 38 ms
52,284 KB
testcase_21 AC 40 ms
52,884 KB
testcase_22 AC 39 ms
53,168 KB
testcase_23 AC 38 ms
52,556 KB
testcase_24 AC 38 ms
52,616 KB
testcase_25 AC 38 ms
52,956 KB
testcase_26 AC 39 ms
52,552 KB
testcase_27 AC 37 ms
52,352 KB
testcase_28 AC 36 ms
51,964 KB
testcase_29 AC 36 ms
52,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C = map(int, input().split("^"))
mod = 10 ** 9 + 7
if A % mod == 0:
    print(0, 0)
    exit()
ans1 = pow(A, B * C, mod)
ind = pow(B, C, mod - 1)
ans2 = pow(A, ind, mod)
print(ans1, ans2)
0