QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 256 MB Total points: 100

#22786. 找零

Statistics

給定一次購物的金額($1 \le P \le 99$),單位為美分,求用一美元付款後應如何找零。使用四種標準美國硬幣面額:1、5、10 和 25 美分。找零使用的硬幣數應最少。

輸入格式

一行,一個整數 $P$,表示購物金額。

輸出格式

一行,四個整數,依序表示應找回的 25 美分、10 美分、5 美分和 1 美分硬幣的數量。

範例

輸入格式 1

43

輸出格式 1

2 0 1 2

題目來源:傳統題

Discussions

About Discussions

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.

Open Discussions 0
No discussions in this category.

Issues

About Issues

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:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.