Submit solution
Points:
6
Time limit:
1.0s
Memory limit:
16M
Author:
Problem types
Allowed languages
Blockly, C, C++, Java, Pascal, Python
Nick and the Sales of Organic Jams
Nick works as a salesperson for organic jams, and at the end of each day, he wants to calculate his total earnings. For every jar of jam he sells, he receives a specific amount. Additionally, if his sales exceed 50 jars in a day, he receives an extra bonus from the company.
Create a program that helps Nick calculate his total earnings. The program will read three positive integers from the input:
- the amount he receives for each jar of jam,
- the total number of jars he sold in a day,
- the bonus amount given if sales exceed 50 jars.
The program will calculate:
The base earnings by multiplying the price per jar by the number of sales. If the sales exceed 50 jars, it will add the bonus to the base earnings.
Finally, the program will display Nick's total earnings for the day.
Examples
Input
5
30
30
Output
150
Input
7
60
40
Output
460
Comments
Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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