結果

問題 No.933 おまわりさんこいつです
ユーザー kbyskbys
提出日時 2020-06-02 00:18:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 277 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 10,600 KB
実行使用メモリ 21,716 KB
最終ジャッジ日時 2023-08-14 17:26:11
合計ジャッジ時間 3,377 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,820 KB
testcase_01 AC 12 ms
7,840 KB
testcase_02 AC 12 ms
7,816 KB
testcase_03 AC 12 ms
7,904 KB
testcase_04 AC 12 ms
7,792 KB
testcase_05 AC 12 ms
7,804 KB
testcase_06 AC 12 ms
7,788 KB
testcase_07 AC 13 ms
7,900 KB
testcase_08 AC 12 ms
7,848 KB
testcase_09 AC 12 ms
7,764 KB
testcase_10 AC 12 ms
7,832 KB
testcase_11 AC 12 ms
7,908 KB
testcase_12 AC 12 ms
7,848 KB
testcase_13 AC 14 ms
8,348 KB
testcase_14 AC 16 ms
8,708 KB
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 48 ms
17,128 KB
testcase_18 AC 12 ms
7,940 KB
testcase_19 AC 70 ms
19,420 KB
testcase_20 RE -
testcase_21 AC 13 ms
7,764 KB
testcase_22 AC 12 ms
7,816 KB
testcase_23 RE -
testcase_24 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#933
N = int(input())
P = list(map(int,input().split()))
ans = 1
for i in P:
    if i == 0:
        i = 0
    elif i%9 == 0:
        i = 9
    else:
        i = i%9
    ans *= i

while ans >= 10:
    tmp = 0
    for i in str(ans):
        tmp += int(i)
    ans = tmp
print(ans)
0