277. Largest Number
MediumCustom Sort
Arrange the non-negative integers to form the largest possible number. Print it (print 0 if the result is all zeros).
Input format
Line 1: n Line 2: n integers
Output format
The largest number.
Example 1
Input
2 10 2
Output
210
Example 2
Input
5 3 30 34 5 9
Output
9534330
Constraints
1 ≤ n ≤ 100
Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.
Loading the MyLoginn IDE…