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呀???帮我看一下,谢谢#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