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

为什么date=long long (k*sqrt(1+(sqrt(5.0)/2.0)));会编译错误

Posted by sinky at 2011-12-29 20:40:07 on Problem 1067
#include<stdio.h>
#include<math.h>
int main()
{
	long long a,b,m,date;
	double k;
	while(scanf("%lld%lld",&a,&b)!=EOF)
	{
	    	if(a>b)
			   {
   				m=a;
   				a=b;
   				b=m;
   			   }
		k=b-a;
		date=long long (k*sqrt(1+(sqrt(5.0)/2.0)));
		if (date==a) 
		    printf("0\n");
		else 
		printf("1\n");		   
	}
	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