結果

問題 No.933 おまわりさんこいつです
ユーザー Ultimate_Tea_04Ultimate_Tea_04
提出日時 2020-05-01 22:26:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 253 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 12,192 KB
最終ジャッジ日時 2023-08-26 15:06:37
合計ジャッジ時間 5,209 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
12,192 KB
testcase_01 AC 15 ms
7,772 KB
testcase_02 AC 16 ms
7,900 KB
testcase_03 AC 16 ms
7,740 KB
testcase_04 AC 15 ms
7,936 KB
testcase_05 AC 16 ms
7,824 KB
testcase_06 AC 15 ms
7,816 KB
testcase_07 AC 16 ms
7,880 KB
testcase_08 AC 16 ms
7,816 KB
testcase_09 AC 15 ms
7,896 KB
testcase_10 AC 17 ms
7,832 KB
testcase_11 AC 19 ms
7,772 KB
testcase_12 AC 28 ms
7,824 KB
testcase_13 AC 317 ms
8,628 KB
testcase_14 AC 644 ms
8,676 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def d(n):
    ans = 0
    while n > 0:
        ans += n % 10
        n //= 10
    return ans
    
    
n = int(input())
s = input().split()
x = []
for i in s:
    x.append(int(i))
ans = 1
for i in x:
    ans *= i
while ans>9:
    ans = d(ans)
print(ans)
0