結果

問題 No.933 おまわりさんこいつです
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-04-21 23:43:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 666 ms
コンパイル使用メモリ 86,624 KB
実行使用メモリ 93,936 KB
最終ジャッジ日時 2023-09-05 06:11:02
合計ジャッジ時間 4,442 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
70,892 KB
testcase_01 AC 72 ms
71,032 KB
testcase_02 AC 77 ms
70,888 KB
testcase_03 AC 73 ms
71,048 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 91 ms
86,516 KB
testcase_18 AC 72 ms
71,132 KB
testcase_19 AC 97 ms
89,988 KB
testcase_20 WA -
testcase_21 AC 73 ms
71,136 KB
testcase_22 AC 73 ms
70,692 KB
testcase_23 WA -
testcase_24 AC 105 ms
93,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
P = list(map(int,input().split()))
ans = 1
nine = 0
for p in P:
    if p and p%9 == 0:
        nine = 1
    else:
        ans *= p%9
        ans %= 9
        
if ans:
    print(9 if nine else ans%9)
else:
    print(ans)
0