Cetiri
의견: 0
Mirko has chosen four integers which form an arithmetic progression. In other words, when the four numbers are sorted, then the difference between each pair of adjacent elements is constant.
As has become usual, Mirko lost one of the numbers and also is not sure whether the remaining three are in the correct (sorted) order.
Write a program that, given the three remaining numbers, finds the fourth number.
The input contains \(3\) integers between \(-100\) and \(100\) on a single line, separated by single spaces.
Note: the input data will guarantee that a solution, although not necessarily unique, will always exist.
Output any number which could have been the fourth number in the sequence.
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Subtask 1 | 20점 |
4 6 81010 1 47평가 및 의견
Cetiri
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Cetiri