We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 4: Geometric Distribution I
Day 4: Geometric Distribution I
Sort by
recency
|
111 Discussions
|
Please Login in order to post a comment
Your Output 0.066 Expected Output 0.066
Seriously?
numerator, denominator = map(int, input().split())
n = int(input())
p = numerator/denominator
q = 1-p
answer = q**(n-1) * p
print(round(answer,3))