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

PROGRAMMING:The Biggest Water Problem

Luz5年前 (2021-05-10)题库438
#####Title Description
Give you a number, let him change into a big one with Balala energy, Shalu Shalu and little devil. If the number of changes doesn't meet the conditions, let him continue to change... Until the conditions are met.
Ba la la energy, Shalu Shalu, little magic changed: for a number, add all the numbers in his position to get a new number.
If the number is a single digit, then it meets the conditions.
#####Input Description:
Give an integer number n (1 < = n < = 1e9).
#####Output Description:
Output the number that satisfies the condition obtained by N through several operations
#####Input sample 1
```in
twelve
```
######Output sample 1
```out
three
```
#####Example description
```
12 -> 1 + 2 = 3
```
#####Input sample 2
```in
thirty-eight
```
#####Output sample 2
```out
two
```
#####Example description
```
38 -> 3 + 8 = 11 -> 1 + 1 = 2
```
###Title Source
Link: https://ac.nowcoder.com/acm/problem/15173







answer:If there is no answer, please comment