結果

問題 No.403 2^2^2
コンテスト
ユーザー pluto77
提出日時 2016-07-26 12:35:16
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 187 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 77,844 KB
最終ジャッジ日時 2025-12-03 21:07:32
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#coding: utf-8
#yuki403

a,b,c=map(int,raw_input().split('^'))
MOD=10**9+7
if a%MOD==0:
 res1,res2=0,0
else:
 res1=pow(pow(a,b,MOD),c,MOD)
 res2=pow(a,pow(b,c,MOD-1),MOD)
print res1,res2
0