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 |
请帮忙看一下我的程序为什么WA程序如下: #include<stdio.h> int i; int s,d,t; main(){ while(scanf("%d%d",&s,&d)!=EOF){ for(i=1;i<=4;i++) if((5-i)*s-i*d<0){ t=(12-2*i)*s-2*i*d; if(i==4)t=t-s-d; if(t<=0){ printf("Deficit\n"); break; } printf("%d\n",t); break; } } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator