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 pkueducn1 at 2005-01-03 21:50:45 on Problem 1528
#include<stdio.h>
void main(){
	int m,i,sum;
	scanf("%d",&m);
	printf("PERFECTION OUTPUT\n");
	while(m>0){
		sum=0;
		for(i=1;i<m;i++)
			if(m%i==0) sum+=i;
		if(m==sum)
			printf("%5d  PRRFECT\n",m);
		if(m>sum)
			printf("%5d  DEFICIENT\n",m);
		if(m<sum)
			printf("%5d  ABUNDANT\n",m);
		scanf("%d",&m);
	}
	printf("END OF OUTPUT\n");
}
			

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