結果
| 問題 | No.933 おまわりさんこいつです | 
| コンテスト | |
| ユーザー |  forest3 | 
| 提出日時 | 2025-03-21 16:34:37 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 391 bytes | 
| コンパイル時間 | 1,839 ms | 
| コンパイル使用メモリ | 163,148 KB | 
| 実行使用メモリ | 7,324 KB | 
| 最終ジャッジ日時 | 2025-03-21 16:34:40 | 
| 合計ジャッジ時間 | 3,283 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 WA * 1 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for(int i = 0; i < n; i++)
int main() {
	int N;
	cin >> N;
	vector<ll> a(N);
	rep(i, N) cin >> a[i];
	if(N == 1) {
		cout << a[0] << endl;
		return 0;
	}
	ll ans = 1, z = 0;
	rep(i, N) {
		if(a[i] == 0) z = 1;
		if(a[i]) ans = ans * a[i] % 9;
	}
	if(ans == 0 && z == 0) ans = 9;
	cout << ans << endl;
}
            
            
            
        