結果

問題 No.933 おまわりさんこいつです
ユーザー tails1434tails1434
提出日時 2019-12-23 21:58:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 81,664 KB
実行使用メモリ 89,592 KB
最終ジャッジ日時 2023-10-19 05:36:53
合計ジャッジ時間 2,382 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,432 KB
testcase_01 AC 38 ms
53,432 KB
testcase_02 AC 38 ms
53,432 KB
testcase_03 AC 39 ms
53,432 KB
testcase_04 AC 39 ms
53,432 KB
testcase_05 AC 39 ms
53,432 KB
testcase_06 AC 39 ms
53,432 KB
testcase_07 AC 39 ms
53,432 KB
testcase_08 AC 38 ms
53,432 KB
testcase_09 AC 39 ms
53,432 KB
testcase_10 AC 38 ms
53,432 KB
testcase_11 AC 39 ms
53,432 KB
testcase_12 AC 39 ms
53,432 KB
testcase_13 AC 43 ms
59,696 KB
testcase_14 AC 43 ms
59,696 KB
testcase_15 AC 44 ms
61,744 KB
testcase_16 AC 49 ms
66,980 KB
testcase_17 AC 57 ms
76,168 KB
testcase_18 AC 39 ms
53,436 KB
testcase_19 AC 61 ms
79,604 KB
testcase_20 AC 60 ms
78,520 KB
testcase_21 AC 38 ms
53,436 KB
testcase_22 AC 38 ms
53,436 KB
testcase_23 AC 74 ms
89,592 KB
testcase_24 AC 74 ms
89,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    P = list(map(int, input().split()))
    ans = 1
    mod = 9
    for p in P:
        if p == 0:
            print(0)
            exit()
        ans *= p
        ans %= mod
    if ans == 0:
        print(9)
    else:
        print(ans)

if __name__ == "__main__":
    main()
0