简单的博弈论问题
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int a, b;
cin >> a >> b;
double t = (sqrt(5.0) + 1) / 2.0;
if (a > b)
{
int tmp = b;
b = a;
a = tmp;
}
//std::cout <<int(1.618 * (b - a))<< std::endl;
if (int(t* (b - a)) == a)
printf("B\n");
else
printf("A\n");
}
return 0;
}