HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > Lab11 - SWE > problem:


50435 - City Electric Bills

Lab11 - SWE

Start: Dec.12.2023 at 12:16:04 AM
Finish: Dec.22.2023 at 11:16:04 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (3)

Contest problems

• 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

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

City Electric Bills

OSHEE calculates the electric bills for home use as follows:

  • The first 310kWh is 7.7lek per kWh
  • Above 310kWh: 13.5lek per kWh
  • City Enlightenment: 8lek per kWh
  • Value added tax (%20)

Question: Write a program that calculates the sum of bills for n clients when the consumption (kWh) and city enlightenment amounts are given. Note: Round payments for each client to the nearest integer.

Input specification
In the beginning, you will be given two integers

  • n: the number of clients where 0 ≤ n ≤ 3000.
  • cea: city enlightenment amount (kWh) which is between 0 and 200
then in the following n lines you will be given n integers (consumption) where 0 ≤ consumption ≤ 2000.

Output specification
Show one integer number: total amount of bills.


Sample Input  
3 41
420
235
310
Sample Output  
10863

Explanation:
The bill for the first customer is calculated as follows:

  • The first 310kw is from 7.7 lek per kw and 2387 leke
  • Exceeding 110kw is from 13.5 lek per kw and 1485 leke
  • 41 kw city enlightenment from 8 leke 328 leke
and the total is 4200. Then, 20% tax is added over it which makes the total: 5040 leke
  • The bill for the first client is 5040
  • The bill for the second client is 2565
  • The bill for the third client is 3258
Thus, the sum is 10863.
Для отправки решений необходимо выполнить вход.

www.contester.ru