結果

問題 No.933 おまわりさんこいつです
ユーザー Meso Meso
提出日時 2025-01-22 19:41:46
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 212 bytes
コンパイル時間 355 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 21,376 KB
最終ジャッジ日時 2025-01-22 19:41:49
合計ジャッジ時間 2,693 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
p = list(map(int, input().split()))

res = 1
for i in range(n):
    if p[i] == 0:
        print(0)
        exit()
    else:
        res *= p[i] % 9
        res %= 9

print(9 if res == 0 else res)
0