#C2690. Sum of Digits List
Sum of Digits List
Sum of Digits List
Given a list of integers, your task is to replace each integer with the sum of its digits. For example, for the integer 123, the sum of digits is computed as \(1+2+3=6\). The program should read the list from the standard input, process the list, and output the resulting list of sums to the standard output.
The input will first contain an integer \(n\) representing the number of integers in the list, followed by \(n\) integers separated by spaces. The output should be \(n\) integers separated by a single space, where each integer is the sum of the digits of the corresponding input integer.
Note: If the list is empty (i.e. \(n=0\)), the program should output nothing.
inputFormat
The first line of input contains a single integer \(n\) (\(0 \leq n \leq 10^5\)), which is the number of integers in the list. The second line contains \(n\) integers separated by spaces. Each integer \(a_i\) satisfies \(0 \leq a_i \leq 10^9\).
outputFormat
Output a single line with \(n\) integers separated by a space, where each integer is the sum of the digits of the corresponding input integer. If \(n=0\), output nothing.
## sample3
123 456 789
6 15 24