UVA-11727 - Cost Cutting

  • UVa Online Judge 解題結果請於 Submit 後,參閱 uHunt
  • 如果你有任何建議與指教,歡迎於下方留言一起討論喔!
  • 相同題目:ZOJ-d659

題意概要

簡單來說,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
profile-image
David Lu
Hello, I'm David Lu. I am a graduate student in Department of Computer Science at National Chiao Tung University, Taiwan. I am in the Networking and Sensing Systems (NSS) Lab at NCTU. If you have any question, please feel free to contact with me.
comments powered by Disqus