結果
| 問題 | No.933 おまわりさんこいつです |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-15 23:19:22 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 46 ms / 2,000 ms |
| + 871µs | |
| コード長 | 290 bytes |
| 記録 | |
| コンパイル時間 | 275 ms |
| コンパイル使用メモリ | 69,632 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-11 03:38:52 |
| 合計ジャッジ時間 | 1,884 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include<iostream>
using namespace std;
int main(){
int n; cin >> n;
long long int ans=1,p;
for(int i=0;i<n;i++){
cin >> p;
if(p==0){cout << 0 << endl; return 0;}
ans = (ans * (p%9))%9;
}
if(ans==0) cout << 9 << endl;
else cout << ans << endl;
}