結果

問題 No.933 おまわりさんこいつです
ユーザー 学ぶマン
提出日時 2025-05-19 20:38:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 428 ms
コンパイル使用メモリ 81,660 KB
実行使用メモリ 93,140 KB
最終ジャッジ日時 2025-05-19 20:38:19
合計ジャッジ時間 3,573 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
P = list(map(int, input().split()))

ans = 1
def f(n:int):
    res = 0
    for s in str(n):
        res += int(s)
        if res >= 10:
            res -= 9
    return res

for p in P:
    ans *= f(p)
    ans = f(ans)

print(ans)
0