#C11633. Subscription Cost Calculator
Subscription Cost Calculator
Subscription Cost Calculator
You are given a subscription type, the number of months, and a discount percentage. There are 3 subscription types available:
- Basic with a monthly fee of 500
- Standard with a monthly fee of 1000
- Premium with a monthly fee of 1500
The total cost is calculated using the formula:
$\text{Total Cost} = \text{Monthly Fee} \times \text{Months} \times \Bigl(1 - \frac{\text{Discount}}{100}\Bigr)$
Output the resulting integer value after applying the discount.
inputFormat
The input consists of a single line containing three values separated by spaces:
- a string representing the subscription type (Basic, Standard, or Premium),
- an integer representing the number of months, and
- an integer representing the discount percentage.
For example: Standard 12 10
outputFormat
Output a single integer which is the total cost after applying the discount, calculated as:
$\text{Total Cost} = \text{Monthly Fee} \times \text{Months} \times \Bigl(1 - \frac{\text{Discount}}{100}\Bigr)$
## sampleBasic 12 0
6000
</p>