In Amazon EC2, there are n virtual machine (VMs) types, and each type has a limited number of instances available. Each time a VM instance is rented, the customer pays a fee equal to:
There are m customers arriving one by one. Each customer always rents from the VM type that currently has the highest availability. After a rental, the availability of that VM type decreases by 1. The task is to determine the total revenue earned after serving all rental requests.


