結果
| 問題 |
No.1237 EXP Multiple!
|
| コンテスト | |
| ユーザー |
keisuke6
|
| 提出日時 | 2022-08-17 12:10:37 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 463 bytes |
| コンパイル時間 | 2,091 ms |
| コンパイル使用メモリ | 201,364 KB |
| 最終ジャッジ日時 | 2025-01-30 23:25:27 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 14 WA * 2 RE * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int N;
cin>>N;
vector<int> S(N);
for(int i=0;i<N;i++) cin>>S[i];
sort(S.rbegin(),S.rend());
if(S[0] >= 4){
cout<<1000000007<<endl;
return 0;
}
vector<int> A={0,1,4,729};
int ans = 1;
for(int i=0;i<N;i++){
ans *= A[S[i]];
if(ans > 1e9+7){
cout<<1000000007<<endl;
return 0;
}
}
cout<<1000000007%ans<<endl;
}
keisuke6