結果
問題 | No.1578 A × B × C |
ユーザー |
![]() |
提出日時 | 2023-09-12 01:22:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 577 bytes |
コンパイル時間 | 1,491 ms |
コンパイル使用メモリ | 193,056 KB |
最終ジャッジ日時 | 2025-02-16 21:44:12 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | WA * 22 |
ソースコード
#include <bits/stdc++.h>#include<iostream>#include<map>#include<vector>#include <algorithm>#include<math.h>#include <iomanip>#include<set>#include <numeric>#include<string>using ll = long long;using namespace std;ll mpow(ll x, ll n, ll mod){ll ans = 1;while (n){if (n&1) ans = ans * x % mod;x = x * x % mod;n >>= 1;}return ans;}int main(){ll a, b, c, n, mod = 1e9+7, r;cin >> a >> b >> c >> n;a = a*b%mod;a = a*c%mod;r = mpow(2, a, mod);a = mpow(a, r, mod);cout << a << endl;}