so-random
Source: hackerearth
Difficulty: MEDIUM

It's the rainy season again, and the city experiences frequent showers throughout the day.

The weather report says that there is a P probability of rainfalls today. Raj has to step out for a meeting at the office, and would like to know the probability that it rains during the time he is on the way.

Input:

The first line of input contains the number of test cases, T. Each of the following T lines contain two numbers, P and time. P denotes the probability that it will rain today and time is the time (in minutes), it will take for Raj to reach his office.

Output:

Output should have T lines each containing answer to corresponding test case. Please round the answer to 4 decimal places.

Constraints:

1 ≤ T ≤ 100
0 ≤ P ≤ 0.5
10 ≤ time ≤ 720
time is a perfect divisor of 1440.

SAMPLE INPUT
2
0 10
.5 720

SAMPLE OUTPUT
0.0000
0.2929


test_case = int(input())

while test_case:
	in_1 = input()
	in_1 = in_1.split()
	
	p = float(in_1[0])
	t = int(in_1[1])
	
	print(("%.4f" % (1-pow(1-p,t/1440.0))))
		
	test_case = test_case -1


T = int(input())
for t in range(T):
	P,time = [float(x) for x in input().split()]
	print("%.4f" % (1-(1-P)**(time/1440.0)))


T = int(input())
for t in range(T):
	P,time = [float(x) for x in input().split()]
	print("%.4f" % (1-(1-P)**(time/1440.0)))


T = int(input())
for t in range(T):
	P,time = [float(x) for x in input().split()]
	print("%.4f" % (1-(1-P)**(time/1440.0)))