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

我都提交了好几遍了,可就是不知道那里错了,帮帮忙老是WR

Posted by xueshanhaizi at 2007-08-24 15:10:11
# include <iostream>
# define N 1.6803
# define n 0.6803
using namespace std;
int main(){
	int a,b,i,max,min;
	while(cin>>a&&cin>>b){
	 if(a<=0||b<=0)break;
	 if(a>b){
		max=a;
		min=b;
		}
	else {
		max=b;
		min=a;
		}
	i=(int)(n*min);
    if(min!=(int)(N*i))
		i++;
	if(max==min+i)cout<<0<<endl;
	else cout<<1<<endl;
		}	


	return 0;
}

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