Makerlab Juniors - Nick and the Sales of Organic Jams

View as PDF

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


  • 0
    alexiou_giorgos  commented on Dec. 14, 2024, 11:06 a.m.

    Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa


  • 1
    tavlakis_nikos  commented on Dec. 14, 2024, 8:04 a.m.

    ΑΝΤΙ ΝΑ ΚΛΕΤΕ ΒΟΥΤΗΡΟΠΑΙΔΑ ΔΕΝ ΣΤΕΛΝΕΤΕ ΤΗΝ ΑΠΝΑΤΗΣΗ;;;;!!!!!!!!!!!!!!


  • -1
    charalampous_aristotelis  commented on Dec. 7, 2024, 8:46 a.m.

    na po kati asheto; Nikola Tesla is better than Albert Ainstain


  • -1
    stavridis_stavros  commented on Dec. 7, 2024, 8:37 a.m.

    bro ti lete!?


  • 0
    charalampous_aristotelis  commented on Dec. 7, 2024, 8:37 a.m.

    E=mc2


  • 0
    nikolopoulos_aggelos  commented on Dec. 1, 2024, 5:19 p.m.

    spaei neurayes


  • 0
    nikolopoulos_aggelos  commented on Dec. 1, 2024, 5:18 p.m.

    diskolo


  • -1
    gatsouli_stavrina  commented on Dec. 1, 2024, 4:14 p.m.

    οχι πολυ δυσκολο


  • 3
    katsouraki_aggelikixara  commented on Dec. 1, 2024, 4:11 p.m.

    e!! Htan diskolo............