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