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

Сборники > Beginners > задача:


50799 - OSHEE Electric Bill

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

• 50310 - Kinetic Energy
• 50314 - Falling Distance
• El Clasico
• 50481 - Car Parking
• 50480 - What quadrant is it?
• 50482 - Bank Charges
• 50430 - ATM
• 50292 - Average of 4 Marks
• 50799 - OSHEE Electric Bill
• 51029 - Buy Three Items
• 51034 - Area of 3 Shapes
• 51032 - Triangle Property
• 51033 - Sum of the series
• 51027 - Download Percentage
• 51028 - Isosceles Triangles
• 51031 - Convert from Hex to Dec
• 51030 - Number of Right Triangles

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

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

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

OSHEE Electric Bill

OSHEE calculates the electric bills for home use as follows:

  • The first 300kWh is 7lek per kWh
  • Above 300kWh: 13lek per each additional kWh

Question: Write full program (C or C++) that gets the previous amount and current amount in kW. Then, calculate amount due from the user.

Input specification
You will be given two integers: previous (pa) and current (ca) amounts in kWh where 0 ≤ pa ≤ ca ≤ 25,000.

Output specification
Show just one number: the amount due from the user.

Sample Input 1
1000 1400
Sample Input 2
2400 2600
Sample Output 1
3400
Sample Output 2
1400

Explanation: The final hour is 1400 so he has used (1400-1000) 400kWh in this month. The first 300kWh is from 7 leke (2100) and extra 100kWh is from 13 leke (1300) and the total is 3400 leke.

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

www.contester.ru