UVA-11727 - Cost Cutting
25 Mar 2018題意概要
簡單來說,XYZ 公司為了要節省成本,假設現在有 位員工,而現在公司要裁掉其中 個。裁決得方式是裁掉拿最多薪水以及拿最少薪水的兩人,現在給你 位員工的薪水,請你找出誰不會被裁員。
- 分析:本題相當簡單,只需要按照題目意思找到「中間值」即可。
Input
The first line of input is an integer T () that indicates the number of test cases. Each case consists of a line with distinct positive integers. These 3 integers represent the salaries of the three employees. All these integers will be in the range .
Output
For each case, output the case number followed by the salary of the person who survives.
Sample Input
3
1000 2000 3000
3000 2500 1500
1500 1200 1800
Sample Output
Case 1: 2000
Case 2: 2500
Case 3: 1500