結果
| 問題 | No.842 初詣 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-18 14:05:47 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 158 ms / 2,000 ms |
| コード長 | 285 bytes |
| 記録 | |
| コンパイル時間 | 1,025 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-03-27 21:25:09 |
| 合計ジャッジ時間 | 6,017 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
A, B, C, D, E, F, G = map(int, input().split())
coins = [A, B, C, D, E, F]
types = [500, 100, 50, 10, 5, 1]
for i, t in enumerate(types):
while coins[i] > 0:
coins[i] -= 1
if G - t < 0:
break
G -= t
if G:
print('NO')
else:
print('YES')