結果

問題 No.933 おまわりさんこいつです
ユーザー Azumabashi
提出日時 2020-05-02 13:28:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 396 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 637,720 KB
最終ジャッジ日時 2024-12-29 20:38:22
合計ジャッジ時間 11,216 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23 TLE * 1 MLE * 1
権限があれば一括ダウンロードができます

ソースコード

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