#K45947. Sum of Squares of Digits
Sum of Squares of Digits
Sum of Squares of Digits
Given a non-negative integer \( n \), compute and print the sum of the squares of its digits. In other words, if \( n \) is represented in base 10 as \( d_kd_{k-1}\ldots d_0 \), you need to calculate:
\( \sum_{i=0}^{k} d_i^2 \)
The input consists of a single non-negative integer. The output should be the computed sum printed to standard output.
inputFormat
The input is given via standard input and consists of one line containing a single non-negative integer \( n \).
outputFormat
Print to standard output the sum of the squares of the digits of \( n \).
## sample123
14
</p>