测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A15515. Medium Number

编程题 普及/提高-

题目描述

Given three distinct integers $a$ , $b$ , and $c$ , find the medium number between all of them.

The medium number is the number that is neither the minimum nor the maximum of the given three numbers.

For example, the median of $5,2,6$ is $5$ , since the minimum is $2$ and the maximum is $6$ .

输入格式

The first line contains a single integer $t$ ( $1 \leq t \leq 6840$ ) — the number of test cases.

The description of each test case consists of three distinct integers $a$ , $b$ , $c$ ( $1 \leq a, b, c \leq 20$ ).

输出格式

For each test case, output a single integer — the medium number of the three numbers.

输入输出样例

输入 #1
9
5 2 6
14 3 4
20 2 1
1 2 3
11 19 12
10 8 20
6 20 3
4 1 3
19 8 4
输出 #1
5
4
2
2
12
10
6
3
8
上一题 去做题 下一题