結果

問題 No.933 おまわりさんこいつです
ユーザー fukafukatanifukafukatani
提出日時 2019-11-29 21:57:31
言語 PyPy3
(7.3.13)
結果
RE  
実行時間 -
コード長 222 bytes
コンパイル時間 2,293 ms
コンパイル使用メモリ 86,260 KB
実行使用メモリ 84,588 KB
最終ジャッジ日時 2023-08-13 05:26:45
合計ジャッジ時間 8,170 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,300 KB
testcase_01 AC 74 ms
71,116 KB
testcase_02 AC 71 ms
71,268 KB
testcase_03 AC 71 ms
71,368 KB
testcase_04 AC 70 ms
71,336 KB
testcase_05 AC 71 ms
71,364 KB
testcase_06 AC 70 ms
71,092 KB
testcase_07 AC 70 ms
71,352 KB
testcase_08 AC 70 ms
71,352 KB
testcase_09 AC 70 ms
71,108 KB
testcase_10 AC 70 ms
71,312 KB
testcase_11 AC 74 ms
75,808 KB
testcase_12 AC 74 ms
75,708 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 96 ms
82,692 KB
testcase_18 AC 72 ms
71,340 KB
testcase_19 AC 183 ms
84,588 KB
testcase_20 RE -
testcase_21 AC 71 ms
71,352 KB
testcase_22 AC 71 ms
71,308 KB
testcase_23 TLE -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()
a = list(map(int, input().split(" ")))
ans = 1
for num in a:
    ans *= num

sum = ans
prev = -1
while len(str(sum)) != 1:
    prev = sum
    sum = 0
    for ch in str(prev):
        sum += int(ch)

print(sum)
0