結果

問題 No.403 2^2^2
ユーザー lif4635lif4635
提出日時 2024-09-09 19:06:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 82,180 KB
実行使用メモリ 53,552 KB
最終ジャッジ日時 2024-09-09 19:06:10
合計ジャッジ時間 2,894 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,696 KB
testcase_01 AC 39 ms
52,328 KB
testcase_02 AC 37 ms
52,536 KB
testcase_03 AC 40 ms
53,076 KB
testcase_04 AC 38 ms
52,724 KB
testcase_05 AC 38 ms
52,212 KB
testcase_06 AC 37 ms
52,612 KB
testcase_07 AC 37 ms
53,172 KB
testcase_08 AC 38 ms
52,620 KB
testcase_09 AC 37 ms
52,456 KB
testcase_10 AC 41 ms
52,824 KB
testcase_11 AC 40 ms
53,120 KB
testcase_12 AC 38 ms
51,760 KB
testcase_13 AC 37 ms
53,036 KB
testcase_14 AC 38 ms
53,492 KB
testcase_15 AC 38 ms
52,624 KB
testcase_16 AC 37 ms
52,984 KB
testcase_17 AC 38 ms
52,140 KB
testcase_18 AC 37 ms
52,268 KB
testcase_19 AC 39 ms
52,352 KB
testcase_20 AC 38 ms
52,864 KB
testcase_21 AC 38 ms
53,164 KB
testcase_22 AC 38 ms
52,796 KB
testcase_23 AC 38 ms
52,860 KB
testcase_24 AC 38 ms
51,940 KB
testcase_25 AC 38 ms
52,000 KB
testcase_26 AC 39 ms
53,304 KB
testcase_27 AC 38 ms
52,220 KB
testcase_28 AC 38 ms
53,552 KB
testcase_29 AC 39 ms
52,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c = map(int,input().split("^"))
ans1 = pow(a,b*c,10**9+7)
k = pow(b,c,10**9+6)
if a%(10**9+7) == 0:
	if k == 0:
		ans2 = 0
	else:
		ans2 = pow(a,k,10**9+7)
else:
	ans2 = pow(a,k,10**9+7)

print(ans1,ans2)
0