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 |
实在过不了,又检不出错,帮帮忙,过了1067的大虾们:-)把您过了的程序给我看一下好吗?非常感谢! #include<iostream.h> #include<math.h> void main() { int a,b,m,n; double c; double d; while(cin>>a>>b) { c=(1+sqrt(5))/2;d=c+1; do { m=(a+1)/c;n=c*m; m*=d; if(a==n&&b==m) a=0; d=c;c++; }while(c<3); if(a>0)cout<<1<<endl;else cout<<0<<endl; // cout<<sign(a);} }cout<<endl; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator