https://www.hackerrank.com/challenges/s10-poisson-distribution-2
In this challenge, we go further with Poisson distributions. We recommend reviewing the previous challenge's Tutorial before attempting this problem.
The manager of a industrial plant is planning to buy a machine of either type or type . For each day’s operation:
A single line comprised of space-separated values denoting the respective means for and :
0.88 1.55
If you do not wish to read this information from stdin, you can hard-code it into your program.
There are two lines of output. Your answers must be rounded to a scale of decimal places (i.e., format):
On the first line, print the expected daily cost of machine . On the second line, print the expected daily cost of machine .
In [13]:
a_m, b_m = [float(i) for i in input().split(" ")]
print(round(160 + 40 * (a_m + a_m ** 2), 3))
print(round(128 + 40 * (b_m + b_m ** 2), 3))
In [ ]: