結果

問題 No.933 おまわりさんこいつです
ユーザー yuly3
提出日時 2020-01-07 10:17:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 272 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,776 KB
最終ジャッジ日時 2024-11-23 00:35:35
合計ジャッジ時間 1,979 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    N, *P = map(int, open(0).read().split())

    if 0 in P:
        print(0)
        exit()
    
    ans = 1
    for p in P:
        ans *= p
        ans %= 9
    
    if ans == 0:
        ans = 9 
    
    print(ans)

if __name__ == '__main__':
    solve()
0