HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50435 - City Electric Bills

Guest
• Review clarifications (3)

Section problems

• 50432 - Numbers and Squares
• 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
• 50435 - City Electric Bills
• 50527 - Sum of LCMs
• 50539 - Number of Chairs - 2
• 50532 - Close City
• 50379 - a^b modulus k
• 50404 - Sum of Self Powers
• 50403 - Number of Chairs
• 50377 - kth Permutation
• Cineplexx

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