結果

問題 No.933 おまわりさんこいつです
ユーザー aaaaaaaaaa2230
提出日時 2022-04-21 23:43:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 89,984 KB
最終ジャッジ日時 2024-06-23 02:34:39
合計ジャッジ時間 2,826 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
P = list(map(int,input().split()))
ans = 1
nine = 0
for p in P:
    if p and p%9 == 0:
        nine = 1
    else:
        ans *= p%9
        ans %= 9
        
if ans:
    print(9 if nine else ans%9)
else:
    print(ans)
0