結果
| 問題 |
No.933 おまわりさんこいつです
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-19 12:23:06 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 461 bytes |
| コンパイル時間 | 683 ms |
| コンパイル使用メモリ | 75,048 KB |
| 最終ジャッジ日時 | 2025-01-08 12:38:38 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 17 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long int ll;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n; cin >> n;
vector<ll> a(n);
ll ans=1;
for(int i=0;i<n;i++){
cin >> a[i];
if(a[i]){
ans*=(a[i]%9);
ans%=9;
}
else{
cout << 0 << endl;
return 0;
}
}
cout << ans << endl;
}