| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
怎么wa了#include<stdio.h>
int main()
{
long x,i;
long sum;
printf("PERFECTION OUTPUT\n");
while(1){
sum=1;
scanf("%d",&x);
if(x==0){printf("END OF OUTPUT\n");break;}
if(x==1)printf("%ld DEFICIENT\n",x);
for(i=2;i<=x;i++)
if((x%i)==0)sum+=i;
if(x==sum)printf("%d PERFECTT\n",x);
else if(x>sum)printf("%d DEFICIENT\n",x);
else printf("%d ABUNDANT\n",x);}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator