結果
| 問題 |
No.933 おまわりさんこいつです
|
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2021-08-12 01:47:19 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 69 ms / 2,000 ms |
| コード長 | 419 bytes |
| コンパイル時間 | 3,198 ms |
| コンパイル使用メモリ | 267,108 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-25 11:37:05 |
| 合計ジャッジ時間 | 4,304 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
long long int ans=1;
long long int P;
for(int i=0;i<N;i++){
cin>>P;
if(ans!=0&&P!=0){
P%=9;
ans*=P;
ans%=9;
if(ans==0){
ans=9;
}
}
else{
ans=0;
}
}
cout<<ans<<endl;
}
vwxyz