Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

怎么wa了

Posted by kruphy at 2010-03-28 13:14:06 on Problem 1528
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator