結果
問題 |
No.933 おまわりさんこいつです
|
ユーザー |
|
提出日時 | 2019-11-29 22:30:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 365 bytes |
コンパイル時間 | 1,574 ms |
コンパイル使用メモリ | 165,788 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-20 23:36:49 |
合計ジャッジ時間 | 2,514 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 WA * 3 |
ソースコード
#include "bits/stdc++.h" #define rep(i,n) for(int i=0;i<n;i++) using namespace std; using ll = long long; int main() { int N, P; cin >> N; ll ans = 1; rep(i, N) { cin >> P; if (P == 0) { cout << 0 << endl; return 0; } ans = (ans * (P % 9)) % 9; } cout << (ans + 8) % 9 + 1 << endl; }