View Code of Problem 197

#include<stdio.h>
#include<math.h>
#include<stdlib.h>

int main(){
	double a,b,tep,c;
	while(scanf("%lf %lf",&a,&b)!=EOF){
		if(b<a){
			tep=b;
			b=a;
			a=tep; 
		}
		c=b-a;
		if((int)(c*((sqrt(5.0)+1)/2.0))==(int)a){
			printf("%d\n",0); 
		}else{
			printf("%d\n",1);
		}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 197