loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import math

def nCr(n,r):
  f = math.factorial
  return f(n) // f(r) // f(n-r)

def calculate_multiplier(mines, diamonds):
  house_edge = 0.01
  return (1 - house_edge) * nCr(25, diamonds) / nCr(25 - mines, diamonds)

while True:
  mines = int(input("Enter number of mines:"))
  diamonds = int(input("Enter number of diamonds:"))
  multiplier = calculate_multiplier(mines, diamonds)
  
  print("Multiplier: {0:.2f}".format(multiplier))