| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 134 | 116 | 107 | 88.430% |
Jayden is a student at Mines, and this semester he wants to study abroad in a foreign country called Umbertoland. In addition to their language and culture, Umbertoland also has a unique currency system. The bill denominations are as follows:
Given the price of an item, help Jayden figure out how many of each bill to use in order to pay the exact amount using the fewest bills possible.
The input will consist of one integer 0ドル \leq N \leq 1,000円$ which is the price of the item in dollars.
Print five space-seperated integers, the number of \$1ドル,ドル \$5ドル,ドル \$15ドル,ドル \$30ドル,ドル and \$150ドル$ bills needed to pay with the fewest total bills, respectively.
16
1 0 1 0 0
44
4 2 0 1 0
45
0 0 1 1 0
School > CS@Mines > CS@Mines HSPC 2024 E번