結果
| 問題 |
No.933 おまわりさんこいつです
|
| コンテスト | |
| ユーザー |
otamay6
|
| 提出日時 | 2019-11-29 22:02:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 499 bytes |
| コンパイル時間 | 1,709 ms |
| コンパイル使用メモリ | 170,248 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-20 22:14:57 |
| 合計ジャッジ時間 | 2,827 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 3 |
ソースコード
#include<bits/stdc++.h>
#define REP(i,n) for(int i=0,i##_len=(n);i<i##_len;++i)
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
#define All(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
int main(){
int N;cin>>N;
vector<ll> P(N);
REP(i,N) cin>>P[i];
ll ans=1;
REP(i,N){
ll q=P[i];
ll d=0;
while(q){
d+=q%10;
q/=10;
}
d%=9;
ans*=d;
ans%=9;
}
cout<<(ans?ans:9)<<endl;
}
otamay6