309920: CF1760A. Medium Number

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:26 Solved:0

Description

Medium Number

题意翻译

你有 $t$ 组数据,每组有两两不同的三个数 $a, b, c$,现在需要你求出他们的中位数。 Translated by @[CLCK](https://www.luogu.com.cn/user/323183)

题目描述

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

Input

题意翻译

你有 $t$ 组数据,每组有两两不同的三个数 $a, b, c$,现在需要你求出他们的中位数。 Translated by @[CLCK](https://www.luogu.com.cn/user/323183)

Output

**题目大意**:

你有 $ t $ 组数据,每组数据包含三个不同的整数 $ a $, $ b $, $ c $,需要你找出每组数据中的中位数。中位数是指既不是最小值也不是最大值的那个数。

**输入输出数据格式**:

**输入格式**:
- 第一行包含一个整数 $ t $($ 1 \leq t \leq 6840 $),表示测试用例的数量。
- 每个测试用例包含三个不同的整数 $ a $, $ b $, $ c $($ 1 \leq a, b, c \leq 20 $)。

**输出格式**:
- 对于每个测试用例,输出一个整数,即这三个数的中位数。**题目大意**: 你有 $ t $ 组数据,每组数据包含三个不同的整数 $ a $, $ b $, $ c $,需要你找出每组数据中的中位数。中位数是指既不是最小值也不是最大值的那个数。 **输入输出数据格式**: **输入格式**: - 第一行包含一个整数 $ t $($ 1 \leq t \leq 6840 $),表示测试用例的数量。 - 每个测试用例包含三个不同的整数 $ a $, $ b $, $ c $($ 1 \leq a, b, c \leq 20 $)。 **输出格式**: - 对于每个测试用例,输出一个整数,即这三个数的中位数。

加入题单

算法标签: