版本3和5间的区别 (跳过第2版)
于2006-04-21 21:00:36修订的的版本3
大小: 1805
编辑: czk
备注:
于2008-02-23 15:35:51修订的的版本5
大小: 1825
编辑: localhost
备注: converted to 1.6 markup
删除的内容标记成这样。 加入的内容标记成这样。
行号 44: 行号 44:
/*Written by czk*/

Let the Balloon Rise

http://acm.zju.edu.cn/show_problem.php?pid=2104

Time limit: 1 Seconds

Memory limit: 32768K

Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and find the result. This year, they decide to leave this lovely job to you.

1. Input

Input contains multiple test cases. Each test case starts with a number N (0 < N < 1000) -- the total number of balloons distributed. The next N lines contain one color each. The color of a balloon is a string of up to 15 lower-case letters.

A test case with N = 0 terminates the input and this test case is not to be processed.

2. Output

For each case, print the color of balloon for the most popular problem on a single line. It is guaranteed that there is a unique solution for each test case.

3. Sample Input

zju2104 (2008-06-01 13:23:49由czk编辑)

ch3n2k.com | Copyright (c) 2004-2020 czk.