結果
問題 |
No.1578 A × B × C
|
ユーザー |
|
提出日時 | 2022-06-11 00:37:57 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 2,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 223 ms |
コンパイル使用メモリ | 82,464 KB |
実行使用メモリ | 54,304 KB |
最終ジャッジ日時 | 2024-09-21 07:49:23 |
合計ジャッジ時間 | 2,118 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
import sys input = lambda: sys.stdin.readline().rstrip() mod = 1000000007 ################## def large_pow(a, b, c, mod): "return (a^(b^c)) % mod. p:prime." r = pow(b, c, mod-1) return pow(a, r, mod) a, b, c = map(int, input().split()) k = int(input()) ans = large_pow((a*b*c)%mod, 2, k, mod) print(ans)