#include<iostream> #include<math.h> using namespace std; int main(){ int a,b; while(cin>>a>>b){ if(int(abs(b-a)*((1+sqrt(5.0))/2))==min(a,b)) cout<<0<<endl; else cout<<1<<endl; } }
Double click to view unformatted code.