1917 最多点数


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

小明喜欢与同伴玩扑克游戏。几副不全的仅有数字标记作为牌张的扑克拼叠一起,小明在一副牌中会拿到n张牌,某张牌K可能会重复出现B次,其点数就是K*B,一副牌中各个牌张最大的点数就是该副牌的赢点。注意对于多个赢点(牌点),则取最小牌点。小明对于拿到手的牌,该以什么牌去PK同伴呢?请你设计解决。

Input

小明会拿到一副副的牌,每副牌,以张数n为起始(若为0,则结束扑克游戏),之后是n个整数,表示牌张数字,从1到13不等。

Output

输出小明牌中最大点数的牌张数字。每副牌一个数字,占一行。

Sample

Input

10
2 3 4 2 3 6 7 13 2 8
15
1 2 3 9 11 11 2 11 13 1 5 6 7 2 2
0

Output

13
11

Source: qn


Comments

There are no comments at the moment.