~/algor $ cat problems/raqam-yigindisi-eng-katta-son
Number with the largest digit sum
Easy
1000 ms
64 MB
31%
$n$ positive integers are given. Print the one whose sum of digits is the largest. If there are several such numbers, print the first one in the list.
Input
The first line contains a positive integer $n$.
The second line contains $n$ positive integers.
Output
One positive integer.
Note
$1 \le n \le 10^{4}$
each number is from $1$ to $10^{9}$
Examples
Input #1
4 123 99 1000 45
Output #1
99
Input #2
3 18 81 9
Output #2
18