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

Разделы > Economics & Finance > задача:


50523 - Total Tax to Pay

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

Задачи раздела

• 51040 - Annual profit
• 51038 - Simple interest
• 51039 - Automated billing system
• 50958 - ATM
• 50482 - Bank Charges
• 50491 - Brokers
• 50806 - TVSH
• 50514 - Bookkeeping
• 50523 - Total Tax to Pay
• 50534 - Top Trading Company
• 50405 - Accounts Receivable

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

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

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

Total Tax to Pay

You work for a market chain. Daily report is prepared every night. And, the amount of tax to be paid for that day is calculated. Every item has different tax percentage and the item price includes the tax price. Because the total amount includes the tax, it is divided by (1+tax).

Item Price = Base price + Tax
Base Price = (Item Price) / (1+Tax)

Question: Write a program that is going to read the sales information and then the program will calculate the total amount of tax to be paid.

Input specification
You will be given an integer (n) the number of items sold today where 0 ≤ n ≤ 1000. Then, in each of the following n lines you will be given 3 numbers :

  1. number of items sold: an integer where 0 < number of items sold ≤ 50
  2. item price: a floating point number where 0 < unit price ≤ 1000
  3. tax percentage: a floating point number between 0 and 0.30

Output specification:
One floating point number with three digits precision.

Sample Input I
3
4 60 0.25
5 60 0.20
4 90 0.20
Sample Output I
158.0

Explanation: Then, the tax for every item:

  1. The first item is 4x$60=$240 and 240/1.25=$192. Then, the tax is $240-$192=$48
  2. The second item is 5x$60=$300 and 300/1.20. Then, the tax is $50
  3. The first item is 4x$90=$360 and 360/1.20. Then, the tax is $60
is the tax to be paid. And the total is $158.



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

www.contester.ru