結果

問題 No.1578 A × B × C
ユーザー ygd.ygd.
提出日時 2021-07-02 21:25:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 250 bytes
コンパイル時間 130 ms
コンパイル使用メモリ 82,288 KB
実行使用メモリ 53,776 KB
最終ジャッジ日時 2024-06-29 05:17:00
合計ジャッジ時間 1,700 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    A,B,C = map(int,input().split()); MOD = pow(10,9) + 7
    K = int(input())
    x = pow(2,K,MOD-1)
    a = pow(A,x,MOD)
    b = pow(B,x,MOD)
    c = pow(C,x,MOD)
    ans = a*b*c%MOD
    print(ans)

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