#K52002. Maximum Formed Integer
Maximum Formed Integer
Maximum Formed Integer
Given an array of positive integers, rearrange them to form the maximum possible integer. The final result may be very large, so it should be returned as a string.
You need to read the input from standard input (stdin) and print the output to standard output (stdout).
In other words, if you are given an array (a_1, a_2, \dots, a_n), arrange them in such an order that the resulting number (\text{result} = A_1A_2\dots A_n) is maximized, where each (A_i) is the string representation of (a_i).
inputFormat
The first line contains a single integer (n), representing the number of elements in the array. The second line contains (n) space-separated positive integers.
outputFormat
Output a single string which is the largest integer that can be formed by concatenating the given numbers.## sample
5
3 30 34 5 9
9534330
</p>