At Least One Deal Closed
The sales manager at Whetcode is reviewing the outbound desk. A rep closes a deal on any given call with a known probability, and the calls are independent - the list is cold and unrelated, so a refusal tells you nothing about the next prospect. Every rep makes the same fixed number of calls a day.
What she wants is not the average number of deals, which she already knows. She wants the chance a rep finishes the day with something rather than nothing, because a blank day is what makes people quit. She reruns the figure for each desk, since the close rate and the daily quota both differ from one campaign to the next.
Task: Print the probability of closing at least one deal across the day's calls, rounded to 4 decimals.
Input
The first line holds the probability of closing on a single call, a decimal between 0 and 1. The second line holds how many calls a rep makes in a day, a whole number of at least 1.
Output
One line holding the probability of at least one close, rounded to 4 decimals and printed the way Python prints a float - 0.6723, and 0.9375 rather than 0.93750.
Example:
Input:
0.2
5
Output:
0.6723
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in