結果
| 問題 |
No.933 おまわりさんこいつです
|
| コンテスト | |
| ユーザー |
775_koari
|
| 提出日時 | 2019-12-04 22:10:09 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 403 bytes |
| コンパイル時間 | 1,725 ms |
| コンパイル使用メモリ | 169,584 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-14 12:23:32 |
| 合計ジャッジ時間 | 3,054 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 15 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
typedef long long ll;
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin >> n;
vector<ll> p(n);
ll sum=1;
rep(i,n){
cin >>p[i];
sum *= p[i];
}
if(sum==0){
cout << 0 << endl;
}else if(sum%9==0){
cout << 9 << endl;
}else{
cout << sum%9 << endl;
}
return 0;
}
775_koari