HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Beginners > problem:


045. 50391 - Cinema Tickets

Guest
• Review clarifications (4)

Volume problems

• 020. 50351 - Convert inches to cm
• 025. 50294 - Centimeters to Yards
• 028. 50521 - Pound to Grams
• 030. 50341 - Separate Into Digits
• 034. 50502 - Welcome Andi - 1
• 040. 50879 - Passed or Failed
• 040. Problem 1
• 042. 50798 - Passing the course
• 045. 50391 - Cinema Tickets
• 048. 50403 - Number of Chairs
• 050. 50568 - Body Mass Index Calc...
• 052. 50503 - Welcome Andi - 2
• 053. 50501 - The Highest Average
• 055. 50355 - Bills of City Water Co...
• 060. 50583 - Max of 3 numbers
• 062. 50402 - Hello World!
• 063. 50547 - Close Pair

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.
Prepared by Ibrahim Mesecan.

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