結果

問題 No.403 2^2^2
ユーザー 👑 jupirojupiro
提出日時 2020-04-15 20:19:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 214 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 53,508 KB
最終ジャッジ日時 2024-04-09 18:58:35
合計ジャッジ時間 1,982 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,152 KB
testcase_01 AC 32 ms
53,012 KB
testcase_02 AC 32 ms
52,548 KB
testcase_03 AC 33 ms
51,632 KB
testcase_04 AC 32 ms
53,508 KB
testcase_05 AC 32 ms
52,428 KB
testcase_06 AC 32 ms
52,336 KB
testcase_07 AC 33 ms
51,876 KB
testcase_08 AC 33 ms
52,684 KB
testcase_09 AC 33 ms
52,316 KB
testcase_10 AC 33 ms
52,440 KB
testcase_11 AC 33 ms
52,432 KB
testcase_12 AC 32 ms
53,496 KB
testcase_13 AC 34 ms
53,352 KB
testcase_14 AC 34 ms
52,428 KB
testcase_15 AC 35 ms
52,076 KB
testcase_16 AC 31 ms
52,492 KB
testcase_17 AC 32 ms
52,608 KB
testcase_18 AC 32 ms
51,836 KB
testcase_19 AC 34 ms
52,396 KB
testcase_20 AC 33 ms
51,812 KB
testcase_21 AC 31 ms
53,492 KB
testcase_22 AC 31 ms
51,628 KB
testcase_23 AC 33 ms
52,608 KB
testcase_24 AC 33 ms
52,204 KB
testcase_25 AC 33 ms
52,696 KB
testcase_26 AC 31 ms
52,348 KB
testcase_27 AC 30 ms
52,156 KB
testcase_28 AC 32 ms
53,156 KB
testcase_29 AC 32 ms
51,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c = map(int,input().split('^'))

mod = 1000000007

if a % mod == 0:
    print("0 0")
    exit()

res1 = pow(pow(a,b,mod),c,mod)

cnt = pow(b,c, mod - 1)

res2 = pow(a,cnt,mod)

print(str(res1) + " "+str(res2))
0