結果

問題 No.933 おまわりさんこいつです
ユーザー kkyokkyo
提出日時 2020-05-05 18:37:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 325 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 21,532 KB
最終ジャッジ日時 2023-09-09 07:01:47
合計ジャッジ時間 2,042 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 15 ms
7,904 KB
testcase_02 AC 15 ms
7,824 KB
testcase_03 AC 15 ms
7,776 KB
testcase_04 AC 15 ms
7,892 KB
testcase_05 AC 15 ms
7,760 KB
testcase_06 AC 15 ms
7,900 KB
testcase_07 AC 15 ms
7,820 KB
testcase_08 AC 15 ms
7,760 KB
testcase_09 AC 15 ms
7,840 KB
testcase_10 AC 16 ms
7,780 KB
testcase_11 AC 16 ms
7,812 KB
testcase_12 AC 16 ms
7,780 KB
testcase_13 AC 17 ms
8,376 KB
testcase_14 AC 18 ms
8,696 KB
testcase_15 AC 22 ms
9,144 KB
testcase_16 AC 37 ms
11,444 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 64 ms
9,916 KB
testcase_21 AC 15 ms
7,760 KB
testcase_22 AC 15 ms
7,792 KB
testcase_23 AC 89 ms
21,532 KB
testcase_24 AC 82 ms
21,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 数字根 = N mod 9 (ただし、0以外の9の倍数の場合は9)

N = int(input())
P = [int(s) for s in input().split()]

ans = 1
for p in P:
    if p == 0:
        ans *= 0
    elif p % 9 > 0:
        ans *= p % 9
    else:
        ans *= 9

    if ans % 9 == 0:
        ans = 9
    else:
        ans %= 9


print(ans)
0