結果

問題 No.933 おまわりさんこいつです
ユーザー paruf4paruf4
提出日時 2020-07-19 22:37:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 181 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 20,476 KB
最終ジャッジ日時 2023-08-22 16:22:26
合計ジャッジ時間 2,233 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,820 KB
testcase_01 AC 15 ms
7,800 KB
testcase_02 AC 16 ms
7,880 KB
testcase_03 AC 16 ms
7,936 KB
testcase_04 AC 16 ms
7,824 KB
testcase_05 AC 15 ms
7,808 KB
testcase_06 AC 16 ms
7,836 KB
testcase_07 AC 16 ms
7,832 KB
testcase_08 AC 17 ms
7,948 KB
testcase_09 AC 16 ms
7,904 KB
testcase_10 AC 16 ms
7,944 KB
testcase_11 AC 16 ms
7,804 KB
testcase_12 AC 16 ms
7,880 KB
testcase_13 AC 17 ms
8,324 KB
testcase_14 AC 18 ms
8,600 KB
testcase_15 AC 21 ms
9,164 KB
testcase_16 AC 32 ms
11,576 KB
testcase_17 AC 40 ms
17,028 KB
testcase_18 AC 15 ms
8,248 KB
testcase_19 AC 50 ms
19,608 KB
testcase_20 AC 54 ms
9,992 KB
testcase_21 AC 16 ms
7,820 KB
testcase_22 AC 16 ms
7,756 KB
testcase_23 AC 78 ms
20,476 KB
testcase_24 AC 78 ms
20,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

k = 1

for pp in p:
    if pp == 0:
        print(0)
        exit(0)
    k *= (pp % 9)   
    k %= 9

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