結果
| 問題 | 
                            No.509 塗りつぶしツール
                             | 
                    
| コンテスト | |
| ユーザー | 
                             gew1fw
                         | 
                    
| 提出日時 | 2025-06-12 20:57:26 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 289 bytes | 
| コンパイル時間 | 225 ms | 
| コンパイル使用メモリ | 81,920 KB | 
| 実行使用メモリ | 51,840 KB | 
| 最終ジャッジ日時 | 2025-06-12 21:00:58 | 
| 合計ジャッジ時間 | 2,542 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 1 WA * 26 | 
ソースコード
# Define the cost for each digit based on the problem's requirements
digit_costs = {
    '0': 2,
    '1': 3,
    '2': 3,
    '3': 3,
    '4': 3,
    '5': 3,
    '6': 4,
    '7': 3,
    '8': 4,
    '9': 2
}
n = input().strip()
total = 0
for c in n:
    total += digit_costs[c]
print(total)
            
            
            
        
            
gew1fw