結果

問題 No.933 おまわりさんこいつです
ユーザー GrayCoderGrayCoder
提出日時 2019-11-29 22:22:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 436 bytes
コンパイル時間 840 ms
コンパイル使用メモリ 10,912 KB
実行使用メモリ 15,356 KB
最終ジャッジ日時 2023-08-13 06:39:03
合計ジャッジ時間 6,958 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
13,088 KB
testcase_01 AC 20 ms
8,688 KB
testcase_02 AC 20 ms
8,592 KB
testcase_03 AC 19 ms
8,580 KB
testcase_04 AC 19 ms
8,740 KB
testcase_05 AC 20 ms
8,704 KB
testcase_06 AC 19 ms
8,720 KB
testcase_07 AC 20 ms
8,676 KB
testcase_08 AC 20 ms
8,572 KB
testcase_09 AC 20 ms
8,584 KB
testcase_10 AC 20 ms
8,556 KB
testcase_11 AC 21 ms
8,592 KB
testcase_12 AC 27 ms
8,724 KB
testcase_13 AC 176 ms
8,752 KB
testcase_14 AC 343 ms
8,904 KB
testcase_15 AC 1,565 ms
9,404 KB
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from functools import reduce
from operator import mul
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())
    P = map(int, input().split())

    k = reduce(mul, P)
    ans, d = 0, 1
    while 1:
        while d > 0:
            d, m = divmod(k, 10)
            ans += m
            k = d
        if ans < 10:
            break
        d, k = 1, ans
        ans = 0
    print(ans)


main()
0