设|PA|为z P点坐标(x,y) 则由相似三角形可得 |PB|=z*y*sqrt(z²-x²)。ans=|PA|*|PB|=z²*y*sqrt(z²-x²)
所以ans与y成正相关 因为 x y可互换 所以 ans也与x成正相关 由样例可知 ans=2*x*y
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cctype>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<set>
#define scnaf scanf
#define cahr char
#define bug puts("bugbugbug");
using namespace std;
typedef long long ll;
const int mod=1000000007;
const int maxn=150+5;
const int inf=1e9;
const double eps=1e-8;
int main()
{
int T_T;
scanf("%d",&T_T);
while(T_T--){
int x,y;
scanf("%d%d",&x,&y);
printf("%d\n",2*x*y);
}
return 0;
}