#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
const double gold=(sqrt(5)+1)/2;
int main()
{
int a,b;
int nt;
scanf("%d", &nt);
while(nt--)
{
scanf("%d%d",&a,&b);
if(b<a)
swap(a,b);
int temp=b-a;
if(floor((double)temp*gold)==a)
printf("Brother\n");
else
printf("John\n");
}
return 0;
}
一个不知名的题
最新推荐文章于 2021-12-19 23:44:35 发布