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

Турниры > IMPC - 2013-2014 > задача:


2013-04-70. 50296 - Total Discount Rate

IMPC - 2013-2014

Старт: 16.мар.2013 в 12:00:00
Финиш: 16.мар.2013 в 17:00:00
Турнир завершён!
• Турнирная таблица

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

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

• 2013-03-20. 50589 - Numri i vezeve...
• 2013-03-30. 50559 - Faktoret e thje...
• 2013-03-40. 50685 - Perdorimi i dh...
• 2013-04-10. 50335 - Five Math Ope...
• 2013-04-100. 50323 - Filtering Cont...
• 2013-04-30. 50337 - Exam Averages
• 2013-04-40. 50338 - Convert Into ...
• 2013-04-50. 50774 - Hot Potato
• 2013-04-70. 50296 - Total Disc...
• 2013-04-80. 50343 - The number of...
• 2013-04-90. 50332 - Variance of a ...
• 2013-05-10. 50552 - Kepuce te perd...
• 2013-05-30. 50580 - Sa dite kane ka...
• 2013-05-40. 50553 - I pjestueshem...
• 2013-05-50. 50593 - Transportimi
• 2013-12-10. 50352 - Selling Cows
• 2013-12-40. 50342 - 100 Factorial

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

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

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

Total Discount Rate

Mr. Dardani has a wholesale company. He frequently makes discounts of different rates according to several different criteria. He records all his sales in a file. In the file he keeps the actual prices and the discount rate. At the end of every month, he wants to see the total discount rate, which is calculated with the following formula

  totalDiscountRate = 100 - (Total Sale Price) / (Sum of Actual Price) * 100;

Write a program that is going to read all sale and discount information and then calculate the totalDiscountRate out of gross sale amount.

Input specification
There will be n lines of sale information. Every line will contain 2 float numbers (saleAmount and discountRate), where 1 ≤ n ≤ 10000, 0 ≤ saleAmount ≤ 10000 and 1 ≤ discountRate ≤ 100

  • saleAmount is the amount of the sale before discount
  • discountRate is the percentage of the discount

Output specification
Show one floating point number that gives the total discountRate.

      

  Sample Input:
   3
   100 7
   150 10
   200 5

  Sample Output:
   7.111

  Output Explanation  :

Item Nr.    Actual Price    Sale Price
1
100
93
2
150
135
3
200
190
 Sum of Actual Price  Total Sale Price
450
418


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

www.contester.ru