結果

問題 No.1578 A × B × C
ユーザー yansi819
提出日時 2024-03-21 18:24:22
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 4,156 ms
コンパイル使用メモリ 249,244 KB
最終ジャッジ日時 2025-02-20 10:41:15
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;

const ll mod = 1000000007;
ll a, b, c, k, x, y;

int main() {
  cin >> a >> b >> c >> k;
  x = a * b % mod;
  x = x * c % mod;
  y = pow_mod(2, k, mod - 1);
  cout << pow_mod(x, y, mod) << endl;
  return 0;
}
0