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

PROGRAMMING:The ultimate digital and

Luz5年前 (2021-05-10)题库405
Input a positive integer n (in the range of long long type), assume that the sum of all numbers in n is m, if M is greater than 9, then calculate the sum of all numbers of M, repeat this process until the sum of numbers is 1 digit, and output the final sum of numbers.
###Input example:
```in
one hundred and twenty-three million four hundred and fifty-six thousand seven hundred and eighty-nine
```
###Output example:
```out
nine
```
###Input example:
```in
nineteen thousand nine hundred and ninety-six
```
###Output example:
```out
seven
```







answer:If there is no answer, please comment