#t57. 数位和
数位和
Sum of Digits
Problem Description
Xiaoyang has positive integers. He wants to know the maximum digit sum among these numbers. The "digit sum" of a number is the sum of all its digits. For example, for the number , its digits are ; adding them gives , so the digit sum of is .
Input Format
The first line contains a positive integer , the number of positive integers.
The next lines each contain a positive integer.
Output Format
Output the maximum digit sum among these positive integers.
Sample Input
3
16
81
10
Sample Output
9
Sample Explanation
Among the three numbers in the sample: the digit sum of is , of is , of is . The maximum is .
Constraints
For all data, , and each positive integer does not exceed .