Score : $100$ points
For an integer $n$, let $S(n)$ be the sum of digits in the decimal notation of $n$. For example, we have $S(123) = 1 + 2 + 3 = 6$.
Given two $3$-digit integers $A$ and $B$, find the greater of $S(A)$ and $S(B)$.
Input is given from Standard Input in the following format:
$A$ $B$
Print the value of the greater of $S(A)$ and $S(B)$.
If these are equal, print $S(A)$.
123 234
9
We have $S(123) = 1 + 2 + 3 = 6$ and $S(234) = 2 + 3 + 4 = 9$, so we should print the greater of these: $9$.
593 953
17
100 999
27