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 |
Re:实在不解,怎么会RE呀???帮我看一下,谢谢In Reply To:实在不解,怎么会RE呀???帮我看一下,谢谢 Posted by:SilenceIowyh at 2005-08-29 20:23:13 > #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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator