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

PROGRAMMING:Finding all completions in a certain range

Luz5年前 (2021-05-10)题库439
If a number is exactly equal to the sum of its factors, the number is called "perfect". For example: the factor of 6 is 1,2,3, and 6 = 1 + 2 + 3, so 6 is "perfect". Program to find out all completions between any two positive integers m and n.
###Input format:
Input two positive integers m and n (1 < m ≤ n ≤ 1000) in one line, separated by spaces.
###Output format:
Output the factor of each completion within the given range line by line, each completion occupies one line, and the format is "completion"   its   factors   are   1,2,3 ", in which the completions and factors are given in increasing order. If there is no completion in the interval, output "not"   Found!”。
###Input sample 1:
```in
3 30
```
###Output sample 1:
```out
6 its factors are 1,2,3
28 its factors are 1,2,4,7,14
```
###Input sample 2:
```in
600 900
```
###Output sample 2:
```out
Not Found!
```







answer:If there is no answer, please comment