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

Сборники > Фёдор Меньшиков. Тренировки > задача:


136. 50443 - Dajte Express

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

Задачи сборника

• 110. 50288 - Even numbers in even...
• 115. 50425 - Calculating Weekly Pay
• 118. 50514 - Bookkeeping
• 120. 50426 - Calculating Sales
• 125. 50484 - Number Of Letters
• 130. 50440 - Call Center
• 132. 50504 - School contest
• 135. 50392 - How much space
• 136. 50443 - Dajte Express
• 140. 50655 - Plotpjesetueshmeria me 9
• 145. 50656 - Plotpjestueshmeria me 11
• 147. 50553 - I pjestueshem me 2013
• 148. 50596 - Udhetimi juaj eshte ketu
• 148. 50596 - Udhetimi juaj eshte ketu
• 150. 50763 - Valid Password
• 151. 50560 - Distanca maksimale
• 153. 50368 - Right-most non zero d...

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

Dajte Express

Dajte Express is a cable car travelling from Tirana to the mount Dajte. It has different discount rates according to the ages.

  • It's free until 6 years old
  • Between 7 and 12 years old: 500 leke
  • Over 12 years old: 800 leke
There is also discount for the groups. For the groups of 10 or more people who are paying (over 6 years old), each person is 500 leke.

Question: Write a program that reads ages for different groups for a day and calculates the amount collected in that day.

Input specification
Ages are integer between 0 and 120. In a day, there can be several groups and ages of people in every group are written in separate lines. Every group may have several people (at most 100 people). A negative number at the end of every line signals the end of the group. The day ends with a negative number at the beginning of the line.

Output specification
Show one number: the total amount of money gathered in that day. Total amount of money is in the limit of int.

 Sample Input   
 26 4 -1
 22 25 36 13 3 25 11 13 67 19 23 10 -1
 21 10 -1
 -1
 Sample Output   
 7600

Explanation:   First group has just one person paying 800.
  The second group has 11 people over 6 and totally they pay 5500
  The last group has two people: one pays 800, and the other pays 500 leke
  Grand total is 7600 leke.

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

www.contester.ru