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 trymj at 2006-03-24 18:25:05 on Problem 2586
程序如下:


#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:
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