HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50975 - Cinema Tickets

Section problems

• 50886 - Even or Odd
• 50894 - ASCII Codes
• 50897 - Prime Number
• 50901 - Sum of Cubes-1
• 50907 - Second Largest
• 50910 - Flipping Coins
• 50950 - Biggest Number
• 50957 - Divisible by 3
• 50975 - Cinema Tickets
• 50959 - Draw the Pattern
• 50898 - Draw the Pattern
• 50961 - Order of 3 Runner
• 50963 - Append Two Arrays
• 50968 - Number of Letters
• 50969 - Chef and Feedback
• 50888 - Extracting Digits
• 50893 - Print All Numbers

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