Hidden Sum
Time limit1sMemory limit1024 MB
Given ten integers, print the one that equals the sum of the other nine.
- Level
Easy1 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Simas and Jurgis play the following game. Simas chooses nine integers, both positive and negative, for example . He then computes their sum and hides it somewhere among the numbers. This gives ten numbers in total: .
Simas then shows the sequence to Jurgis. Jurgis wants to find, as quickly as possible, which of the ten numbers is the hidden sum of the other nine.
Write a program that helps Jurgis find the hidden sum.
Input
The input consists of ten lines. Each line contains one integer.
Output
Your program must print the integer that is the hidden sum. The answer is always unique.
Constraints
- All numbers are between and .