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 |
????????????????好象很简单,但老是过不了,又测试不出# include <iostream.h> # include <math.h> void main() { int a,b; double m=(1+sqrt(5))/2,n=m+1; int c,d; while(cin>>a>>b) { // m=(1+sqrt(5))/2;n=m+1; d=int( (a+1)/m );//N c=int(m*d); d=int(n*d); if( a==c && b==d ) cout<<0<<endl; else cout<<1<<endl; } cout<<endl; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator