QOJ.ac

QOJ

時間限制: 1.0 s 記憶體限制: 32 MB 總分: 100

#16997. 平均值

统计

Slavko 决定向 Mirko 发起挑战!他给了 Mirko 一个实数 $P$ 和一个装满纸片的袋子,每张纸片上都恰好写着一个 $1$ 到 $5$ 之间的整数。每种纸片的数量都是无限的。

Mirko 的任务是选择最少数量的纸片,使得这些纸片上写着的数字的平均值恰好等于 $P$。

输入格式

输入仅包含一行,一个实数 $P$。

$P$ 的小数点后有 $1$ 到 $9$ 位数字(包含边界),且满足 $1 \le P \le 5$。

输出格式

输出仅包含一行,五个非负整数,分别表示所使用的数字 $1, 2, 3, 4, 5$ 的纸片数量。如果有多种解决方案,输出其中任意一种即可。

样例

输入样例 1

5.0

输出样例 1

0 0 0 0 1

输入样例 2

4.5

输出样例 2

0 0 0 1 1

输入样例 3

3.20

输出样例 3

0 0 4 1 0

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.