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

PROGRAMMING:Find the perfect number

Luz5年前 (2021-05-10)题库512
The so-called perfect number is that the number is exactly equal to the sum of the factors except itself. For example: 6 = 1 + 2 + 3, where 1, 2 and 3 are factors of 6. This problem requires programming to find out all completions between any two positive integers $$M $$and $$n $$.
###Input format:
Input gives two positive integers $$M $$and $$n $$($$1 < m / Le n / Le 10000 $$) in one line, separated by spaces.
###Output format:
Output the decomposition formula of factor accumulation form of each completion within a given range line by line, each completion occupies one line, and the format is "completion = factor 1 + factor 2 +... + factor K", in which the completion and factors are given in increasing order. If there is no completion in the interval, output "None".
###Input example:
```in
2 30
```
###Output example:
```out
6 = 1 + 2 + 3
28 = 1 + 2 + 4 + 7 + 14
```







answer:If there is no answer, please comment