price_estimator.py 395 B

12345678910
  1. from math import log
  2. def price(num_operators: int, base_price=15, discount_per_doubling=0.9):
  3. return base_price * num_operators * discount_per_doubling ** log(num_operators, 2)
  4. if __name__ == '__main__':
  5. for i in [1, 2, 3, 5, 10, 20, 40, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, 100000, 200000, 500000, 1000000]:
  6. print(f'{i} operators: {price(i):,.2f} €')