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 |
100b不到的代码怎么写的,180极限了#include <iostream> #include <cmath> using namespace std; #define u (sqrt(5.0)+1)/2 int main() { int a,b; while(cin>>a>>b) { if(a>b){swap(a,b);} cout<<((floor((b-a)*u)==a)?"0":"1")<<endl; } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator