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

PROGRAMMING:Taotao doesn't like 3, 6, 9

Luz5年前 (2021-05-10)题库454
Taotao doesn't like numbers 3, 6 and 9. When counting, it starts from 1, and those with these three numbers will skip. For example: 1, 2, 4, 5, 7, 8, 10, 11, 12, 14, 15, 17, 18, 20, 21, 22, 24, 25, 27, 28, 40,... Enter an N, and when Taotao counts to N, what is the sum of all the numbers she counts? If n contains 3, 6 and 9, Taotao will not count to this number.
###Input format:
Enter a positive integer n.
###Output format:
Enter the sum of Taotao numbers, or prompt Taotao not to count n.
###Input sample 1:
Here is a set of inputs. For example:
```in
twelve
```
###Output sample 1:
The corresponding output is given here. For example:
```out
sixty
```
###Input sample 2:
Here is a set of inputs. For example:
```in
thirteen
```
###Output sample 2:
The corresponding output is given here. For example:
```out
Taotao can't count 13
```






answer:If there is no answer, please comment