結果

問題 No.933 おまわりさんこいつです
ユーザー AzumabashiAzumabashi
提出日時 2020-05-02 13:29:21
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 396 bytes
コンパイル時間 559 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 540,548 KB
最終ジャッジ日時 2023-08-28 16:22:53
合計ジャッジ時間 7,902 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 AC 72 ms
71,308 KB
testcase_02 AC 70 ms
71,516 KB
testcase_03 AC 70 ms
71,612 KB
testcase_04 AC 70 ms
71,528 KB
testcase_05 AC 71 ms
71,532 KB
testcase_06 AC 72 ms
71,420 KB
testcase_07 AC 69 ms
71,580 KB
testcase_08 AC 69 ms
71,416 KB
testcase_09 AC 70 ms
71,568 KB
testcase_10 AC 71 ms
71,260 KB
testcase_11 AC 78 ms
76,040 KB
testcase_12 AC 84 ms
76,300 KB
testcase_13 AC 106 ms
80,684 KB
testcase_14 AC 117 ms
81,000 KB
testcase_15 AC 184 ms
90,608 KB
testcase_16 AC 991 ms
181,264 KB
testcase_17 AC 110 ms
86,288 KB
testcase_18 AC 69 ms
71,248 KB
testcase_19 AC 126 ms
89,004 KB
testcase_20 TLE -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(10**6)


def get_digit_sum(n):
    if n < 10:
        return n
    else:
        return get_digit_sum(n % 10 + n // 10)


def main():
    length = int(input())
    sequence = [get_digit_sum(int(x)) for x in input().split()]
    product = 1
    for seq in sequence:
        product *= seq
    print(get_digit_sum(product))


if __name__ == '__main__':
    main()

0