給定一次購物的金額($1 \le P \le 99$),單位為美分,求用一美元付款後應如何找零。使用四種標準美國硬幣面額:1、5、10 和 25 美分。找零使用的硬幣數應最少。
輸入格式
一行,一個整數 $P$,表示購物金額。
輸出格式
一行,四個整數,依序表示應找回的 25 美分、10 美分、5 美分和 1 美分硬幣的數量。
範例
輸入格式 1
43
輸出格式 1
2 0 1 2
題目來源:傳統題
給定一次購物的金額($1 \le P \le 99$),單位為美分,求用一美元付款後應如何找零。使用四種標準美國硬幣面額:1、5、10 和 25 美分。找零使用的硬幣數應最少。
一行,一個整數 $P$,表示購物金額。
一行,四個整數,依序表示應找回的 25 美分、10 美分、5 美分和 1 美分硬幣的數量。
43
2 0 1 2
題目來源:傳統題
The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.
This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.
If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.
Guidelines: