結果

問題 No.933 おまわりさんこいつです
ユーザー tails1434
提出日時 2019-12-23 21:50:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 833 ms
コンパイル使用メモリ 82,156 KB
実行使用メモリ 93,184 KB
最終ジャッジ日時 2024-09-19 01:39:09
合計ジャッジ時間 2,958 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

def calc(x):
    ret = 0
    while x > 0:
        ret += x % 10
        x //= 10
    return ret

def main():
    N = int(input())
    P = list(map(int, input().split()))
    A = 1
    for p in P:
        A *=  calc(p)
        A = calc(A)
    print(calc(A))

if __name__ == "__main__":
    main()
0