結果

問題 No.403 2^2^2
ユーザー 双六双六
提出日時 2020-07-29 04:25:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 86,772 KB
実行使用メモリ 71,860 KB
最終ジャッジ日時 2023-09-11 07:07:00
合計ジャッジ時間 4,377 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,844 KB
testcase_01 AC 93 ms
71,692 KB
testcase_02 AC 93 ms
71,404 KB
testcase_03 AC 93 ms
71,408 KB
testcase_04 AC 91 ms
71,488 KB
testcase_05 AC 93 ms
71,528 KB
testcase_06 AC 92 ms
71,688 KB
testcase_07 AC 92 ms
71,692 KB
testcase_08 AC 92 ms
71,324 KB
testcase_09 AC 94 ms
71,740 KB
testcase_10 AC 92 ms
71,784 KB
testcase_11 AC 93 ms
71,672 KB
testcase_12 AC 92 ms
71,760 KB
testcase_13 WA -
testcase_14 AC 94 ms
71,580 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 95 ms
71,464 KB
testcase_18 AC 92 ms
71,608 KB
testcase_19 AC 93 ms
71,604 KB
testcase_20 AC 92 ms
71,320 KB
testcase_21 AC 94 ms
71,700 KB
testcase_22 AC 92 ms
71,604 KB
testcase_23 AC 95 ms
71,600 KB
testcase_24 AC 92 ms
71,604 KB
testcase_25 WA -
testcase_26 AC 92 ms
71,860 KB
testcase_27 AC 93 ms
71,532 KB
testcase_28 AC 92 ms
71,520 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	A, B, C = list(input().split("^"))
	A = int(A); B = int(B); C = int(C)
	if A % con == 0:
		print(0)
		return
	ans1 = pow(pow(A, B, con), C, con)
	ans2 = pow(A, pow(B, C, con - 1), con)
	print(ans1, ans2)




if __name__ == '__main__':
	main()
0