Problem F
Sum Squared Digits Function
The Sum Squared Digits function,
then:
is the sum of squares of the digits of the representation.
Write a program to compute the Sum Squared Digits function of an input positive number.
Input
The first line of input contains a single decimal integer
Each data set consists of a single line of input. It
contains the data set number,
Output
For each data set there is a single line of output.
The single line of output consists of the data set number,
Sample Input 1 | Sample Output 1 |
---|---|
3 1 10 1234 2 3 98765 3 16 987654321 |
1 30 2 19 3 696 |