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

实在不解,怎么会RE呀???帮我看一下,谢谢

Posted by SilenceIowyh at 2005-08-29 20:23:13 on Problem 2581
#include<stdio.h>
void main()
{
	float m;
	int a,b,c,d,e,i,j,k,l,flag;
	while(scanf("%f%d%d%d%d",&m,&b,&c,&d,&e)!=EOF)
	{
		a=(int)m*100;
		flag=1;
		for(i=0;i<=e&&flag==1;i++)
		for(j=0;j<=b&&flag==1;j++)
		for(k=0;k<=c&&flag==1;k++)
		for(l=0;l<=d&&flag==1;l++)
			if((j*25+k*10+l*5+i)==a)
			{
				printf("%d %d %d %d\n",j,k,l,i);
				flag=0;
			}
		if(flag==1)
			printf("NO EXACT CHANGE\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