結果
| 問題 | No.1578 A × B × C |
| コンテスト | |
| ユーザー |
chacoder1
|
| 提出日時 | 2021-12-30 19:18:19 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 495 bytes |
| 記録 | |
| コンパイル時間 | 1,143 ms |
| コンパイル使用メモリ | 211,684 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-06-24 22:12:50 |
| 合計ジャッジ時間 | 2,264 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | WA * 22 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define int long long
static const int mod=1000000007;
long long modpow(long long a, long long n, long long mod) {
long long res = 1;
while (n > 0) {
if (n & 1) res = res * a % mod;
a = a * a % mod;
n >>= 1;
}
return res;
}
signed main(){
int a,b,c,k;cin>>a>>b>>c>>k;
int ans=a*b%mod;
ans*=c;
c%=mod;
ans=modpow(ans,k+1,mod);
cout<<ans<<endl;
return 0;
}
chacoder1