#include<stdio.h>
int main()
{
int i,k,l,sum1=0,sum2=0;
for(i=1;i<=3000;i++)
{
for(k=1;k<=i/2;k++)
{if(i%k==0)
{sum1+=k;
}
}
for(l=1;l<=sum1/2;l++)
{if(sum1%l==0)
{sum2+=l;
}
}
if(i==sum2&&sum1>i&&sum1<=3000)
{printf("(%d,%d)",i,sum1);
}
sum1=0;sum2=0;
}
return 0;
}
标签:return,int,11.22,sum2,sum1,&&,main From: https://blog.51cto.com/u_15758636/5878517