結果
| 問題 | No.842 初詣 | 
| コンテスト | |
| ユーザー |  pete1288998 | 
| 提出日時 | 2020-06-21 18:34:30 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 164 ms / 2,000 ms | 
| コード長 | 486 bytes | 
| コンパイル時間 | 86 ms | 
| コンパイル使用メモリ | 12,800 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-03 18:10:26 | 
| 合計ジャッジ時間 | 1,903 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 21 | 
ソースコード
c = list(map(int,input().split()))
C = c[:-1]
g = c[-1]
for a in range(C[0]+1):
    for b in range(C[1]+1):
        for c in range(C[2]+1):
            for d in range(C[3]+1):
                for e in range(C[4]+1):
                    for f in range(C[5]+1):
                        total = 500*a + 100*b + 50*c + 10*d + 5*e + 1*f
                        if total == g:
                            print('YES')
                            exit()
print('NO')                        
            
            
            
        