結果

問題 No.1828 Except 3
ユーザー ymmtr(せるたわーしーぷ!)
提出日時 2022-06-09 20:12:40
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 489 bytes
コンパイル時間 1,597 ms
コンパイル使用メモリ 165,820 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-21 05:38:13
合計ジャッジ時間 2,412 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define ALL(a)  (a).begin(),(a).end()
int main(){
    ll n;cin>>n;
    ll a=0,b=0,c=0;
    ll temp;
    for(ll i=0;i<n;i++){
        cin>>temp;
        if(temp%3>0){
            a++;
        }
    }
    for(ll i=0;i<n;i++){
        cin>>temp;
        if(temp%3>0){
            b++;
        }
    }
    for(ll i=0;i<n;i++){
        cin>>temp;
        if(temp%3>0){
            c++;
        }
    }
    cout<<a*b*c<<endl;
}
0