結果

問題 No.933 おまわりさんこいつです
ユーザー rkyiolklorkyiolklo
提出日時 2020-05-03 15:01:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 175 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 20,404 KB
最終ジャッジ日時 2023-09-02 22:51:06
合計ジャッジ時間 2,151 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,808 KB
testcase_01 AC 16 ms
7,720 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 AC 15 ms
7,728 KB
testcase_04 AC 15 ms
7,924 KB
testcase_05 AC 15 ms
7,824 KB
testcase_06 AC 14 ms
7,800 KB
testcase_07 AC 15 ms
7,788 KB
testcase_08 AC 15 ms
7,788 KB
testcase_09 AC 15 ms
7,724 KB
testcase_10 AC 15 ms
7,792 KB
testcase_11 AC 17 ms
7,792 KB
testcase_12 AC 16 ms
7,780 KB
testcase_13 AC 17 ms
8,212 KB
testcase_14 AC 18 ms
8,580 KB
testcase_15 AC 21 ms
9,156 KB
testcase_16 AC 34 ms
11,372 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 56 ms
9,868 KB
testcase_21 AC 16 ms
7,800 KB
testcase_22 AC 15 ms
7,896 KB
testcase_23 AC 79 ms
20,388 KB
testcase_24 AC 80 ms
20,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
P=list(map(int,input().split()))
cnt=1
for i in range(n):
    if P[i]==0:
        print(0)
        break
    cnt*=P[i]
    cnt%=9

print(cnt%9 if cnt!=0 else 9)
0