HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > Epoka Science Olympiad 2016 > problem:


6-3. 50975 - Cinema Tickets

Epoka Science Olympiad 2016

Start: Apr.11.2016 at 02:07:57 PM
Finish: Apr.24.2016 at 05:00:00 AM
The contest is finished!
• Contest scoreboard

Contest problems

• 11-5. 50971 - Belote Game
• 11-P1. 50906 - The Smallest Pair
• 11-P2. 50907 - Second Largest
• 11-P3. 50908 - Buy 1 Get 1
• 11-P4. 50909 - Gold Coins
• 11-P5. 50910 - Flipping Coins
• 6-1. 50937 - Calculate the Average
• 6-2. 50938 - Translate Score into Gr...
• 6-3. 50975 - Cinema Tickets
• 6-4. 50942 - Win or Lose
• 6-5. 50943 - Word Game
• 6-P1. 50881 - Exchange the Values
• 6-P3. 50883 - Win or Lose
• 6-P4. 50884 - Area and Perimeter Of...
• 6-P5. 50885 - Calculate the Average
• 7-1. 50945 - Bigger or Smaller
• 7-2. 50946 - Area of Rectangle

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Cinema Tickets

Millennium Cinema center wants to start a computerized system. The ticket prices change according to the ages.

  • Between the ages 0 and 3: Free
  • Between the ages 4 and 9: $5
  • Over the age of 9: $8

The cashier, asks the age and gives the ticket.

Question:
Write a program that gets the ages of 3 people and calculates the total amount to be paid.

Input specification
You will be given three integer numbers (n) where the ages are integers between 0 and 120.

Output specification
Show just one integer number: total amount of money to be paid.

Sample Input I
6 1 9

Sample Input II
43 10 7

Sample Output I
10

Sample Output II
21

 

Для отправки решений необходимо выполнить вход.

www.contester.ru