結果

問題 No.1828 Except 3
ユーザー parentheses
提出日時 2022-02-01 20:20:59
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 461 bytes
コンパイル時間 2,011 ms
コンパイル使用メモリ 196,892 KB
最終ジャッジ日時 2025-01-27 18:12:24
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    int N; cin >> N;
    vector<ll> A(N),B(N),C(N);
    for (int i = 0; i < N; i++) cin >> A[i];
    for (int i = 0; i < N; i++) cin >> B[i];
    for (int i = 0; i < N; i++) cin >> C[i];
    
    ll ans = 1;
    for (auto& X : {A, B, C}) {
        ll num = 0;
        for (auto x : X) if (x % 3 != 0) num++;
        ans *= num;
    }
    
    cout << ans << endl;
    return 0;
}
0