#P6352. [COCI 2007/2008 #3] CETIRI
[COCI 2007/2008 #3] CETIRI
Problem Description
You originally had numbers. After sorting them in ascending order, they form an arithmetic progression.
Now one number is missing, and the order of the remaining three numbers has also been shuffled.
Please find the fourth number.
Input Format
Input one line with three integers. It is guaranteed that these numbers are in the range .
Output Format
Output one line with one number, the fourth number.
The solution may not be unique, but it is guaranteed that at least one solution exists. This problem uses SPJ.
4 6 8
10
10 1 4
7
Hint
Explanation
Translated from COCI2007-2008 CONTEST #3 T1 CETIRI。
Translated by ChatGPT 5