結果

問題 No.933 おまわりさんこいつです
ユーザー hipopo
提出日時 2020-01-10 19:09:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 2,410 ms
コンパイル使用メモリ 191,428 KB
最終ジャッジ日時 2025-01-08 17:02:20
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ll = long long;

int main() {
    int n;
    cin >> n;
    ll res = 1;
    for (int i = 0; i < n; i++) {
        ll a;
        cin >> a;
        res *= a % 9 == 0 ? 9 : a % 9;
        res = res % 9 == 0 ? 9 : res % 9;
    }
    cout << (res % 9 == 0 ? 9 : res % 9) << endl;
}
0