← Back to Problems
Knocking In
Easy standard Stochastic Calculus
Time limit: 1 s per test  ·  Memory: 256 MB

A stock's log-price follows a driftless Brownian motion with volatility sigma, starting at 0. A barrier option knocks in if the log-price reaches the level a > 0 at any time in [0, T]. Compute the probability that the option knocks in.

Input

Three numbers sigma, a and T, each with at most 6 digits after the decimal point.

Output

One real number: the knock-in probability, with relative error at most 1e-9. Note that the probability can be extremely small; your output must be relatively accurate, not just close to zero.

Constraints

0.01 <= sigma <= 5

0.001 <= a <= 20

0.001 <= T <= 30

a <= 30 * sigma * sqrt(T)

Scoring

This is a standard problem: a submission scores full points if it produces the correct output for every test case, and zero otherwise.

Numeric answers are accepted if they are within a relative tolerance of 1e-09 of the expected value.

Examples

input
0.2 0.1 1
output
6.170750774519738e-01
input
0.3 0.6 4
output
3.173105078629141e-01
Python 3.13 i Execution environment Isolated microVM · 1 vCPU · no internet access Time and memory limits are set per problem Available packages numpy 2.5.0scipy 1.18.0pandas 3.0.0scikit-learn 1.9.0statsmodels 0.15.0cvxpy 1.9.2