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

PROGRAMMING:Output all Narcissus numbers less than n

Luz5年前 (2021-05-10)题库453
This problem requires that all Narcissus numbers less than n (101 ≤ n ≤ 1000) be output from small to large. The so-called narcissus number is a 3-digit number whose cubic sum of each digit is equal to the number itself. For example, 153 is the number of daffodils, because 153 = 1 \ * 1 \ * 1 + 5 \ * 5 \ * 5 + 3 \ * 3.
###Input format:
Enter a value that gives n (101 ≤ n ≤ 10000) in one line.
###Output format:
Output the number of daffodils, and each number is on a separate line. If the number of daffodils less than n does not exist, "None" is output.
###Input example:
```in
four hundred
```
###Output example:
```out
one hundred and fifty-three
three hundred and seventy
three hundred and seventy-one
```







answer:If there is no answer, please comment