mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
34806a93cd
2500-2599
19 lines
333 B
C++
19 lines
333 B
C++
#include<stdio.h>
|
|
#include<math.h>
|
|
int main()
|
|
{
|
|
int n;
|
|
double u,v,s;
|
|
while(scanf("%d",&n)!=EOF)
|
|
{
|
|
while(n--)
|
|
{
|
|
scanf("%lf%lf",&s,&u);
|
|
v=tan(atan(1/s)-atan(1/u));
|
|
v=1.0/v;
|
|
printf("%.0lf\n", v*u-s*u-s*v);
|
|
}
|
|
}
|
|
return 0;
|
|
}
|