A1074 | [COCI-2006_2007-contest3]#4 PATULJCI
来源COCI
时间限制1s
内存限制128MB
通过 / 提交0/0
题目描述
Every day, while the dwarves are busy in the mines, Snow White prepares dinner for them; seven chairs, seven plates, seven forks and seven knives for seven hungry dwarves.
One day nine dwarves came from the mines instead of seven (nobody knows how or why), each of them claiming to be one of Snow White's seven dwarves.
Luckily, each dwarf wears a hat with a positive integer less than 100 written on it. Snow White, a famous mathematician, realised long ago that the sum of numbers on the hats of her seven dwarves was exactly 10
0.
Write a program which determines which dwarves are legit, i.e. pick seven of nine numbers that add to 10
0.
One day nine dwarves came from the mines instead of seven (nobody knows how or why), each of them claiming to be one of Snow White's seven dwarves.
Luckily, each dwarf wears a hat with a positive integer less than 100 written on it. Snow White, a famous mathematician, realised long ago that the sum of numbers on the hats of her seven dwarves was exactly 10
0.
Write a program which determines which dwarves are legit, i.e. pick seven of nine numbers that add to 10
0.
输入格式
There are 9 lines of input. Each contains an integer between 1 and 99 (inclusive). All of the numbers will be distinct.
输出格式
Your program must produce exactly seven lines of output – the numbers on the hats of Snow White's seven dwarves. Output the numbers in any order.
输入输出样例
输入 #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
暂无题解
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted