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

PROGRAMMING:Output all 3-digit Narcissus numbers between 100 and n

Luz5年前 (2021-05-10)题库377
The so-called narcissus number refers to an m-digit number (M > = 3 & & M < = 7)
The sum of the m-th power of the number is equal to itself. For example, the 3-digit 153 is Narcissus, the cube sum of its digits
It's 153. Requirements: input a 3-digit n, output all between 100 and n (including 100 and N) the number of daffodils with 3 digits.
###Input format:
Input a 3-bit positive integer (no judgment in the program, pay attention to input).
###Output format:
The number of daffodils in the output range, each data occupies a separate line.
###Input example:
```in
seven hundred
```
###Output example:
```out
one hundred and fifty-three
three hundred and seventy
three hundred and seventy-one
four hundred and seven
```







answer:If there is no answer, please comment