402512: GYM100796 F Unusual Sum
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
F. Unusual Sumtime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output
Bob is an aspiring archaeologist. He has found n ancient scrolls, each with an unusual sum written on it. The sum on the i-th scroll reads as
Bob thinks that precise values of these sums encode the location of Aldoredo, the not-so-famous city of gold. Help him calculate the values of the sums!
InputThe first line contains a single integer n, the number of scrolls (1 ≤ n ≤ 105). The i-th of the next n lines contains two space-separated integer numbers li and ri, the description of the sum on the i-th scroll (1 ≤ li ≤ ri ≤ 1018).
OutputOutput n lines: in the i-th line output the value of the sum written on the i-th scroll. Your answer will be considered correct if its relative or absolute error doesn't exceed 10 - 9.
ExamplesInput3Output
1 2
34 76
4 4
0.666666666667
0.016424751719
0.050000000000