P23187 [AtCoder] [ABC019A] Takahashi's Age
入门
题目描述

Problem Description

Takahashi has forgotten his age.

He has successfully gathered three friends, so he decided to use the median of the ages they guess as his age.

Write a program to find the median from three integers \( a, b, c \) on behalf of Takahashi.

The median of three integers is the integer located in the middle when they are arranged in ascending order.

Input Format

The input is given from the standard input in the following format:

\( a \) \( b \) \( c \)

  • Three integers \( a, b, c \) \( (1 \leq a, b, c \leq 100) \) are given separated by spaces.

Output Format

Output the median of \( a, b, c \) to the standard output.

Do not forget the newline at the end.

Sample Input and Output

Sample Input #1

2 3 4

Sample Output #1

3

Sample Input #2

5 100 5

Sample Output #2

5

Sample Input #3

3 3 3

Sample Output #3

3

Sample Input #4

3 3 4

Sample Output #4

3

Notes/Hints

Sample Explanation 1

The median of \( 2, 3, 4 \) is \( 3 \).

Sample Explanation 2

The median of \( 5, 100, 5 \) is \( 5 \).

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
2 3 4
样例输出
3