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 <iostream.h> # include <stdio.h> int main() { long d; long sum; printf("PERFECTION OUTPUT\n"); scanf("%ld",&d);//// while(d>0) { sum=0; for(long i=1;i<d;i++) { if(d%i==0) sum+=i; } if(sum==d) { printf("%5ld PERFECT\n",d); } if(sum>d) { printf("%5ld ABUNDANT\n",d); } if(sum<d && d!=1) { printf("%5ld DEFICIENT\n",d); } scanf("%ld",&d); } printf("END OF OUTPUT\n"); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator