結果

問題 No.933 おまわりさんこいつです
コンテスト
ユーザー tails1434
提出日時 2019-12-23 21:50:23
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 295 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 336 ms
コンパイル使用メモリ 85,248 KB
実行使用メモリ 98,304 KB
最終ジャッジ日時 2026-04-07 05:53:25
合計ジャッジ時間 4,690 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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