結果

問題 No.933 おまわりさんこいつです
ユーザー c-yanc-yan
提出日時 2020-12-09 11:53:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 90 ms / 2,000 ms
コード長 214 bytes
コンパイル時間 320 ms
コンパイル使用メモリ 11,660 KB
実行使用メモリ 22,224 KB
最終ジャッジ日時 2023-10-19 04:49:12
合計ジャッジ時間 2,008 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,940 KB
testcase_01 AC 29 ms
9,940 KB
testcase_02 AC 29 ms
9,940 KB
testcase_03 AC 31 ms
9,940 KB
testcase_04 AC 30 ms
9,940 KB
testcase_05 AC 30 ms
9,940 KB
testcase_06 AC 30 ms
9,940 KB
testcase_07 AC 30 ms
9,940 KB
testcase_08 AC 30 ms
9,944 KB
testcase_09 AC 29 ms
9,944 KB
testcase_10 AC 29 ms
9,944 KB
testcase_11 AC 30 ms
9,964 KB
testcase_12 AC 31 ms
10,000 KB
testcase_13 AC 31 ms
10,312 KB
testcase_14 AC 32 ms
10,484 KB
testcase_15 AC 34 ms
11,044 KB
testcase_16 AC 45 ms
13,580 KB
testcase_17 AC 55 ms
18,844 KB
testcase_18 AC 29 ms
9,940 KB
testcase_19 AC 62 ms
21,344 KB
testcase_20 AC 60 ms
11,696 KB
testcase_21 AC 30 ms
9,940 KB
testcase_22 AC 29 ms
9,940 KB
testcase_23 AC 89 ms
22,224 KB
testcase_24 AC 90 ms
22,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from functools import reduce

def f(x, y):
    t = x * y % 9
    if t == 0:
        return 9
    return t

N, *P = map(int, open(0).read().split())

if P.count(0) > 0:
    print(0)
else:
    print(reduce(f, P, 1))
0