結果
| 問題 | No.933 おまわりさんこいつです | 
| コンテスト | |
| ユーザー |  vwxyz | 
| 提出日時 | 2021-08-12 01:45:47 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 376 bytes | 
| コンパイル時間 | 3,549 ms | 
| コンパイル使用メモリ | 265,896 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-25 11:36:15 | 
| 合計ジャッジ時間 | 4,785 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 WA * 3 | 
ソースコード
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin>>N;
    long long int ans=1;
    long long int P;
    for(int i=0;i<N;i++){
        cin>>P;
        if(ans!=0&&P!=0){
            P%=9;
            ans*=P;
            ans%=9;
            if(ans==0){
                ans=9;
            }
        }
    }
    cout<<ans<<endl;
}
            
            
            
        