So Random
Practice
0 (0 votes)
Mathematics
Medium
Open
Approved
Probability and statistics
Problem
49% Success 497 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

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.

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
1 votes
Tags:
Dynamic ProgrammingProbability and StatisticsMediumMathematicsOpenApproved