1002. Stick
来源:互联网 发布:高清电视网络机顶盒 编辑:程序博客网 时间:2024/05/26 12:04
Anthony has collected a large amount of sticks for manufacturing chopsticks. In order to simplify his job, he wants to fetch two equal-length sticks for machining at a time. After checking it over, Anthony finds that it is always possible that only one stick is left at last, because of the odd number of sticks and some other unknown reasons. For example, Anthony may have three sticks with length 1, 2, and 1 respectively. He fetches the first and the third for machining, and leaves the second one at last. You task is to report the length of the last stick.
The input file will consist of several cases.
Each case will be presented by an integer n (1<=n<=100, and n is odd) at first. Following that, n positive integers will be given, one in a line. These numbers indicate the length of the sticks collected by Anthony.
The input is ended by n=0.
For each case, output an integer in a line, which is the length of the last stick.
31210
2
Problem Source: ZSUACM Team Member
- 1002. Stick
- 1002. Stick
- 1002. Stick
- Stick
- Stick
- Stick
- stick
- stick
- stick
- stick
- usb stick
- Memory Stick
- sicily stick
- 深搜:Stick
- 1200. Stick
- 搜索 stick
- POJ1011 stick
- 1200. Stick
- 1000. MJ, Nowhere to Hide
- 1001. 统计数字
- 1001. 统计数字
- java笔记(5)--反射
- 1002. Stick
- 1002. Stick
- NSMutableURLRequest POST
- 1002. Stick
- Apache DbUtils - JDBC轻量级封装的工具包
- 1003. Message Flood
- 《Win32多线程程序设计》(5)---信号量(Semaphores)
- 二值图的连通区域标记
- 程序员需要有多懒 ?- cocos2d-x 数学函数、常用宏粗整理 - by Glede
- 要找个像素尺真不容易