結果

問題 No.933 おまわりさんこいつです
ユーザー tko919
提出日時 2019-11-30 00:47:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 660 bytes
コンパイル時間 1,512 ms
コンパイル使用メモリ 165,480 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-21 00:23:29
合計ジャッジ時間 2,473 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

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

//template
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll; const int inf = 0x3fffffff; const ll INF = 0x3fffffffffffffff;
template<class T> inline bool chmax(T& a,T b){ if(a<b){a=b;return 1;}return 0; }
template<class T> inline bool chmin(T& a,T b){ if(a>b){a=b;return 1;}return 0; }
//template end



int main(){
    int n; scanf("%d",&n);
    int ans=1;
    rep(i,0,n){
        ll tmp; scanf("%lld",&tmp);
        ans*=(tmp%9); ans%=9;
    }
    printf("%d\n",ans);
    return 0;
}
0