#include <iostream>
using namespace std;
int main()
{
int n, i,m;
for (n = 100; n <1000; n++)
{
m = 1;
for (int i = 2; i < n; i++)
{
if (n % i == 0)
{
m = m + i;
}
}
if (m == n)
{
cout << n << endl;
}
}
}
04-09
471
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-22
3523
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-30
1480
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-04
2万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-21
2454
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交