P6314 [COCI 2006/2007 #3] PATULJCI

Description

Snow White originally had $7$ dwarfs, but one day she met $9$ dwarfs. These nine dwarfs all claimed to be one of Snow White’s $7$ dwarfs. Each of them wears a hat, and on each hat there is a number in the interval $[1,99]$. Snow White knows that the sum of the hat numbers of her $7$ dwarfs is $100$. She wants you to determine which $7$ dwarfs are actually hers.

Input Format

The input consists of $9$ lines, each line contains one number describing the number on a dwarf’s hat.

Output Format

Output $7$ lines, each line contains the hat number of one dwarf that satisfies the requirement. Print the answer in the same order as in the input.

Explanation/Hint

#### Constraints All input numbers are positive integers less than $100$, and it is guaranteed that there is exactly one solution. #### Notes **This problem is translated from [COCI2006-2007](https://hsin.hr/coci/archive/2006_2007/) [CONTEST #3](https://hsin.hr/coci/archive/2006_2007/contest3_tasks.pdf) *T1 PATULJCI*** Translated by ChatGPT 5