ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > Lab11 - SWE > задача:


50396 - Cinema Tickets - 1

Lab11 - SWE

Старт: 12.дек.2023 в 00:16:04
Финиш: 22.дек.2023 в 23:16:04
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (1)

Задачи турнира

• 50428 - Three Times
• 50396 - Cinema Tickets - 1
• 50433 - Sum of Cubes
• 50435 - City Electric Bills
• 50440 - Call Center
• 50462 - Class Average (3 Grades)
• 13-Fall2-30. 50397 - The Number of...
• 14-03-50. 50469 - Letter Grades
• 15-SprPr2-50. 50508 - The Biggest ...
• 2. 50459 - The Biggest Digit

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
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 n people and calculates the total amount of money collected on that day (or month).

Input specification
You will be first given a number (n) the number of the people in that session 0 ≤ n ≤ 100000. Then you will be given n space separated age information in the following lines. Every line will contain at most 1000 integers.

Output specification
Show just one integer number: total amount of money collected.

Sample Input I   
  6
  10 18 5 40 26 3  
Sample Input II   
  10
  43 0 47 39 32 7 39 49 49 4  
Sample Output I   
  37
Sample Output II  
  66


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

www.contester.ru