結果
問題 |
No.933 おまわりさんこいつです
|
ユーザー |
![]() |
提出日時 | 2019-11-30 19:24:45 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 419 bytes |
コンパイル時間 | 1,214 ms |
コンパイル使用メモリ | 159,968 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 03:28:44 |
合計ジャッジ時間 | 2,087 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int n;cin >>n; vector<ll> p(n); ll mult =1; for(int i=0;i<n;i++){ cin >> p[i]; if(p[i]%9==0){ cout << 9<< endl; return 0; } mult=p[i]*(mult%9); } if(mult%9==0){ cout << 9 << endl; }else{ cout << mult%9 << endl; } return 0; }