#CCBCMCHIN0000027. Số ở giữa của ba số (Middle of Three Numbers)
Số ở giữa của ba số (Middle of Three Numbers)
Middle of Three Numbers
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given three integers , , and , the middle value is the second value in their nondecreasing order. Repeated values occupy separate positions.
Input
Three integers , , and on one line.
Output
Print the integer in the middle position.
Subtasks
- Subtask 1 (20 points): The absolute value of each integer is at most .
- Subtask 2 (30 points): The absolute value of each integer is at most .
- Subtask 3 (50 points): The absolute value of each integer is at most .
Examples
Input
9 2 5
Output
5
Explanation
Sorting , , produces , , , whose second value is .