#include <stdio.h> #include <math.h> int main( ) { int a, b, t, k, w; while( scanf("%d%d",&a,&b) != EOF ) { if( a > b ) { t = b; b = a; a = t; } k = b - a; w = (int)( k * ( 1.0 + sqrt( 5 ) ) / 2.0 ); if ( w == a ) printf("%d\n", 0); else printf("%d\n", 1); } return 0; }
POJ 1067:取石子游戏
最新推荐文章于 2024-03-29 15:26:52 发布
