結果

問題 No.933 おまわりさんこいつです
ユーザー mikianaaa
提出日時 2020-09-01 22:08:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 513 bytes
コンパイル時間 1,890 ms
コンパイル使用メモリ 167,388 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-20 18:52:39
合計ジャッジ時間 2,874 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define ll long long
#define INF 1000000000000000000

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int N;
    cin >> N;
    vector<ll> A(N);
    ll a = 1;
    rep(i, N) {
        cin >> A[i];
        a *= A[i];
        if (a % 9 == 0)
            a = 9;
        else
            a %= 9;
    }

    cout << a << endl;

    return 0;
}
0