| ||||||||||
| 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:哪位帮忙看看,这是什么编译错误啊??In Reply To:哪位帮忙看看,这是什么编译错误啊?? Posted by:yaer at 2008-08-27 20:16:13 > #include<iostream>
> #include<math.h>
> using namespace std;
> int main()
> { long j,k,m,n;
> while(cin>>m>>n){
> if(m>n){j=m;m=n;n=j;}
> j=n-m;
> n=(floor)(j*(1.0+sqrt(1.0*5))/2.0);
> if(m==n)
> printf("0\n");
> else printf("1\n");
> }
> }
好像sqrt(X)中,X要为double/float型
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator