HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50435 - City Electric Bills

Guest
• Review clarifications (3)

Section problems

• 50510 - What floor are they?
• 50870 - ZScore normalization
• 50797 - Nr of Missing Guests
• 50518 - Histogram Equalization
• 50522 - Multiplication Table - 2
• 50814 - Buying Books from Internet
• 50812 - Total Discount for the clients
• 51003 - Double Prime
• 50435 - City Electric Bills
• 50527 - Sum of LCMs
• 50440 - Call Center
• 50342 - 100 Factorial
• 50439 - Telephone Calls
• 50436 - Pocket Money
• 50379 - a^b modulus k
• 50353 - Cube of the Largest number
• 50359 - Mode of a Series

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