-->
当前位置:首页 > 题库

PROGRAMMING:Sum of squares

Luz5年前 (2021-05-10)题库453
The function of the program is to input a long integer and find the sum of squares s of each digit. If the input is negative, find the sum of squares of the opposite numbers. For example: input - 123, output 14.
###Input format:
Enter a long integer directly.
###Output format:
Output according to the format of "sum = s", where the sum of squares s of each digit is output as is without width control.
###Input example:
```in
twenty-four
```
###Output example:
```out
sum=20
```
###Input example:
```
-12
```
###Output example:
```
sum=5
```






answer:If there is no answer, please comment