結果
| 問題 | No.933 おまわりさんこいつです | 
| コンテスト | |
| ユーザー |  komkompi | 
| 提出日時 | 2020-03-29 11:23:30 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 83 ms / 2,000 ms | 
| コード長 | 269 bytes | 
| コンパイル時間 | 302 ms | 
| コンパイル使用メモリ | 12,288 KB | 
| 実行使用メモリ | 22,292 KB | 
| 最終ジャッジ日時 | 2025-01-02 13:13:14 | 
| 合計ジャッジ時間 | 2,697 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 25 | 
ソースコード
# coding: utf-8
# Your code here!
N=int(input())
P=list(map(int,input().split()))
temp=1
judge=False
for p in P:
    if p==0:
        print(0)
        exit()
        
    temp=(temp*p)%9
    if temp==0:
        judge=True
if judge:
    print(9)
else:
    print(temp)
            
            
            
        