結果

問題 No.933 おまわりさんこいつです
ユーザー komkompikomkompi
提出日時 2020-03-29 11:23:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,624 KB
実行使用メモリ 21,544 KB
最終ジャッジ日時 2023-08-30 18:39:11
合計ジャッジ時間 2,495 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,924 KB
testcase_01 AC 16 ms
7,892 KB
testcase_02 AC 16 ms
7,892 KB
testcase_03 AC 16 ms
7,924 KB
testcase_04 AC 16 ms
7,764 KB
testcase_05 AC 16 ms
7,900 KB
testcase_06 AC 15 ms
7,680 KB
testcase_07 AC 15 ms
7,768 KB
testcase_08 AC 15 ms
7,788 KB
testcase_09 AC 15 ms
7,924 KB
testcase_10 AC 15 ms
7,756 KB
testcase_11 AC 16 ms
7,752 KB
testcase_12 AC 16 ms
7,828 KB
testcase_13 AC 16 ms
8,232 KB
testcase_14 AC 17 ms
8,572 KB
testcase_15 AC 20 ms
9,116 KB
testcase_16 AC 32 ms
11,512 KB
testcase_17 AC 39 ms
17,096 KB
testcase_18 AC 15 ms
8,228 KB
testcase_19 AC 48 ms
19,496 KB
testcase_20 AC 51 ms
10,024 KB
testcase_21 AC 15 ms
7,764 KB
testcase_22 AC 15 ms
7,944 KB
testcase_23 AC 71 ms
21,544 KB
testcase_24 AC 71 ms
21,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!

N=int(input())
P=list(map(int,input().split()))

temp=1
judge=False
for p in P:
    if p==0:
        print(0)
        exit()
        
    temp=(temp*p)%9
    if temp==0:
        judge=True

if judge:
    print(9)
else:
    print(temp)
0