public static void main(String[] args) {
int n,j,p;
for(n=1;n<=1000;n++){
p=0;
for(j=1;j<n;j++)
if(n%j==0)
p=p+j;
if(p==n)
System.out.println(n);
10-06
1313