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

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


065. 50394 - Water Bills

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

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

• 035. 50573 - Numri dhe shuma
• 040. 50335 - Five Math Operators
• 044. 50597 - Vizatojme Diamante
• 045. 50462 - Class Average (3 Gra...
• 050. 50450 - Last Appereance of a ...
• 058. 50574 - Numrat Trekendesh
• 060. 50362 - Pythagorean Numbers
• 060. s
• 065. 50394 - Water Bills
• 070. 50465 - How many students h...
• 072. 50473 - Counting Circles Positions
• 074. 50396 - Cinema Tickets - 1
• 075. 50363 - Class GPA Average
• 080. 50248 - Power of two
• 085. 50333 - Series of Squares
• 090. 50456 - nth Digit of a Number
• 095. 50651 - Largest power of two

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

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

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

Water Bills

City water company wants to prepare bills faster, now. Write a program for them that reads the water usage amounts of n people and then the program is going to show the sum of the bills. The water rates are computed as follows:

  • $10 fixed price for the first 4 tones
  • If it exceeds 4 tones; $0.005 for each additional litre.
Your program will first get the number of bills to proceed (n). Then n integers represent the amount of water used (litres). It will then print the total sum due from all users.

Input specification
You will be given an integer number (n) where 0 < n ≤ 50000. Then, n intgers are given in the following n lines. The water usage amount for every customer is between 0 and 40000 liters

Output specification
Show the total sum due from all users. The number will contain at most three digits after the floating point.
Note: Use setprecision from iomanip library.

Sample Input I
  5
  5000
  4200
  4400
  3000
  6010

Sample Input II
  10
  4511
  3414
  3864
  3440
  3300
  5505
  3243
  5433
  4734
  3990
Sample Output I
  68.05
Sample Output II
  120.915


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

www.contester.ru