Type: Default 1000ms 256MiB

Airplane

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

飞机向北飞行 x km,再向西飞 y km ,再向南飞 x km ,最后再向东飞 y km

问最后飞机距离起始位置的距离

地球半径 R = 6371 km

飞机飞行高度 h = 10 km

圆周率取 3.14

不考虑地球自转,飞机仅在北半球飞

Input

第一行输入一个数字 T 表示接下来有 T 组测试数据( T <= 10 )

接下来 T 行每行输入两个整数 x 、 y ,含义如 Description 所示, x, y <= 10000;

Output

对于每个测试样例输出一个数,结果向上取整

Format

Input

1
100 0

Output

0

SWPU ROUND #4(DIV.3)

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
6
Start at
2021-11-27 9:00
End at
2021-11-27 11:30
Duration
2.5 hour(s)
Host
Partic.
26