#155easyStatistics
Exponential Waiting Time
Time Limit: 2sMemory: 256MB
Problem
Given an exponential distribution with rate parameter lambda and a time value t, compute the probability that the waiting time exceeds t:
Input Format
Two space-separated floating-point numbers: lambda and t.
Output Format
A single floating-point number to 6 decimal places representing .
Examples
Example 1
Input(Two space-separated floating-point numbers: lambda and t.)
1 1
Output
0.367879
P(X > 1) = e^(-1*1) = e^(-1) = 0.367879.
Example 2
Input(Two space-separated floating-point numbers: lambda and t.)
0.5 2
Output
0.367879
P(X > 2) = e^(-0.5*2) = e^(-1) = 0.367879.
Constraints
- •0.001 <= lambda <= 100
- •0 <= t <= 1000
Loading interactive editor…