Home => ProblemSet => 2.10-05:数字组合
Problem1254--2.10-05:数字组合

1254: 2.10-05:数字组合

Time Limit: 1 Sec  Memory Limit: 128 MB  Submit: 0  Solved: 3
[ Submit ] [ Status ] [ Creator: ][ 参考程序 ]

Description

设有N个正整数,现在需要你设计一个程序,使他们连接在一起成为最大的数字,例3个整数 12,456,342 很明显是45634212为最大,4个整数 342,45,7,98显然为98745342最大

Input

输入整数N 接下来一行输入N个数字,数字之间空格分隔

Output

输出最大的那个数字

Sample Input Copy

3
12 456 342

Sample Output Copy

45634212

HINT

1 <= N <= 1000

Source/Category