結果

問題 No.933 おまわりさんこいつです
ユーザー stng
提出日時 2022-08-15 16:35:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 212 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 81,692 KB
実行使用メモリ 84,612 KB
最終ジャッジ日時 2024-10-02 05:37:34
合計ジャッジ時間 2,559 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
p = [int(i) for i in input().split()]

ans = 1

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

if ans == 0:
    print(9)
else:
    print(ans)
0