結果
| 問題 | No.933 おまわりさんこいつです |
| コンテスト | |
| ユーザー |
NOSS
|
| 提出日時 | 2019-11-29 22:09:05 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 47 ms / 2,000 ms |
| コード長 | 397 bytes |
| 記録 | |
| コンパイル時間 | 526 ms |
| コンパイル使用メモリ | 85,648 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-15 04:29:20 |
| 合計ジャッジ時間 | 1,761 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long int;
int main() {
ll n, ans = 1;
bool zr = false;
cin >> n;
for(int i=0;i<n;i++){
ll a;
cin >> a;
if(a == 0) zr = true;
ans *= a;
ans %= 9;
}
if(ans == 0 && !zr) ans = 9;
cout << ans << endl;
return 0;
}
NOSS