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

PROGRAMMING:Output completion

Luz5年前 (2021-05-10)题库404
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 a perfect number. Program to find out all completions within 2-1000, and output their factors in the following format: 6 its factors are 1 2 3.
###Input format:
nothing
###Output format:
Each line outputs a completion in the following format: there is a space between the factors, and there is also a space at the end of each line.
6 its factors are 1 2 3
......
###Input example:
```in
nothing
```
###Output example:
```out
6 its factors are 1 2 3
28 its factors are 1 2 4 7 14
...
```







answer:If there is no answer, please comment