QOJ.ac

QOJ

시간 제한: 1.0 s 메모리 제한: 32 MB 총점: 20

#17557. 小矮人

통계

每天,当矮人们在矿山忙碌时,白雪公主都会为他们准备晚餐:七把椅子、七个盘子、七把叉子和七把刀,给七个饥饿的矮人。

有一天,从矿山里回来了九个矮人而不是七个(没人知道为什么,也没人知道是怎么回事),他们每个人都声称自己是白雪公主的七个矮人之一。

幸运的是,每个矮人都戴着一顶帽子,上面写着一个小于 $100$ 的正整数。白雪公主,一位著名的数学家,早就意识到她的七个矮人帽子上的数字之和恰好是 $100$。

写一个程序,确定哪些矮人是真正的矮人,即从九个数字中选出七个,使它们的和为 $100$。

输入格式

输入包含 $9$ 行。每行包含一个介于 $1$ 和 $99$ 之间(含)的整数。所有数字都是互不相同的。

输出格式

你的程序必须输出恰好 $7$ 行——即白雪公主的七个矮人帽子上的数字。可以以任意顺序输出这些数字。

样例

输入样例 1

7
8
10
13
15
19
20
23
25

输出样例 1

7
8
10
13
19
20
23

输入样例 2

8
6
5
1
37
30
28
22
36

输出样例 2

8
6
5
1
30
28
22

说明

测试数据保证解是唯一的。

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.