Follow the number of understandings

xiaoxiao2021-03-06  62

// Follow the number #include

Void main () {for (int i = 1; i <1000; i ) {int sum = 0; for (int J = 1; j <= I / 2; j ) IF (I% j == 0) SUM = J; if (sum == i) cout << i << "is the full ./n";}} // here is not the least factor, it is all the factors // faults, not clear This is the sum of the least factors, because the range of the second loop is J / 2; // is still an error, but 100 factors are 2, 5, 10, 20, 25, 50; these factors can be re- The number of points // notes a mathematical phenomenon, the maximum factor of any number of Germany is less than or equal to half of the itself // because a minimum factor can only be greater than or equal to 2!

In fact, ask any addition topic, just put a 0 number there, let the program automatically add more, you have to do what meets the factor of the requirements! Haha @

Written only you can understand!

转载请注明原文地址:https://www.9cbs.com/read-84472.html

New Post(0)