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

Турниры > CEN_114 Midterm A > задача:


3. 50390 - Total Salary Paid

CEN_114 Midterm A

Старт: 14.мая.2020 в 00:00:01
Финиш: 31.мая.2020 в 23:55:59
Турнир завершён!
• Турнирная таблица

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

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

• 1. 50467 - Random Numbers
• 10. 51093 - rgb2gray
• 11. 50410 - Zero Padding
• 12. 50470 - Close Pairs - Revised
• 13. 50735 - Top M Products
• 14. 51094 - Passing the course
• 15. 50804 - Marathon
• 3. 50390 - Total Salary Paid
• 4. 50528 - Rock-Scissors-Paper
• 5. 51087 - Are they the same?
• 6. 51092 - Even and Odd
• 7. 50449 - The biggest result
• 8. 51146 - Popular Baby Names
• 9. 50499 - Table to Row

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

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

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

Total Salary Paid

There are many people working in Mr. Uldedaj's factory. He calculates the weekly salaries according to the following criteria.

  • Up to 20 hours fixed salary: even if they work less than 20 hours they are paid for 20 hours
  • Up to 30 hours fixed rate per hours,
  • Between 31 and 35: 10% more than the fixed hourly rate
  • Between 36 and 40: 20% more than the fixed hourly rate
  • Between 41 and 45: 30% more than the fixed hourly rate
  • Above 45: No salary. That's, in a week, max 45 hours is paid.

Question:
Write a program that reads the working hours of the staff and calculates the total salary to be paid in that month.

Input specification
The first line of the input contains an integer: the number of people (n) where 0 ≤ n ≤ 10000. Then, the following n lines contain two numbers for every worker:

  • fixed hourly rate: a floating point number
  • and number of hours workded: an integer

Output specification
Show one floating point number with 2 digits precision after the floating point.

Sample Input I   
  5
  265 44
  280.7 47
  205 10
  260 21
  170 47
Sample Output I   
  43569.1

Explanation:
Total weekly salary of the workers: 43569.1

  1. 12375.5
  2. 13473.6
  3. 4100
  4. 5460
  5. 8160

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

www.contester.ru