#P6314. Snow White and the Dwarfs
Snow White and the Dwarfs
Snow White and the Dwarfs
Snow White originally had $7$ dwarfs. One day, she encountered 9 dwarfs, each wearing a hat with a number in the range $[1,99]$. However, only 7 of these dwarfs are truly hers, and she remembers that the sum of the hat numbers of her 7 dwarfs is exactly $100$. Given 9 numbers, each representing a hat number, determine which 7 dwarfs belong to Snow White. It is guaranteed that there is a unique solution. Output the numbers of the genuine dwarfs in ascending order.
inputFormat
The input consists of 9 lines. Each line contains a single integer that represents the number on the dwarf's hat.
outputFormat
Output 7 lines, each containing one integer, corresponding to the hat numbers of Snow White's true dwarfs in ascending order.
sample
20
7
23
19
10
15
25
8
13
7
8
10
13
19
20
23
</p>