|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초||128 MB||126||41||29||26.852%|
In laboratories of a certain company a new material called politoksyparen is tested. During the researches an interesting property has been discovered. A simple rod made of this material after being heated lengthens and bends so that it changes into an circular arc based on a chord, which is the shape of the rod at the beginning (this property concerns only rods of short diameters). Let's assume that n rods with very short diameters and lengths li (1 ≤ li ≤ 100,000) were used to verify this property, and while being heated they lengthened respectively by di (1 ≤ di ≤ 100), where di ≤ li/2. As a unit we take one millimeter.
Write a program that:
In the first line of the standard input there is written one positive integer n (n ≤ 50,000). In each of the following n lines there are written two integers separated by a single space — the original length of the rod li and its increase in length during heating di.
In each of n lines of the standard output there should be written one nonnegative integer. The integer in i-th line should be equal to the distance between the positions of the middle of the i-th rod before and after heating computed with a required accuracy.
2 1000 20 15000 10