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

Турниры > Epoka Science Olympiad 2016 > задача:


10-5. 50966 - TVSH

Epoka Science Olympiad 2016

Старт: 11.апр.2016 в 14:07:57
Финиш: 24.апр.2016 в 05:00:00
Турнир завершён!
• Турнирная таблица

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

• 10-1. 50962 - Find the Character
• 10-2. 50963 - Append Two Arrays
• 10-3. 50964 - Increasing or Decreasing
• 10-4. 50965 - Draw the Pattern
• 10-5. 50966 - TVSH
• 10-P1. 50901 - Sum of Cubes-1
• 10-P2. 50902 - Translate Score into...
• 10-P3. 50903 - Basic Math Calculator
• 10-P4. 50904 - Print All Prime Numbers
• 10-P5. 50905 - Convert KPH to MPH
• 11-1. 50967 - Finding Square Roots
• 11-2. 50968 - Number of Letters
• 11-3. 50969 - Chef and Feedback

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

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

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

TVSH

After the new TVSH (Value Added Tax) regulation, government is planning some changes now. There will be three types of taxes

  1. Medical expenses: 6%
  2. Educational expenses: 10%
  3. Others: 20%

Question: Write a program that gets the type and amount of n expenses, and then it calculates the total tax to be paid.

Input specification
You will be first given one integer(n). Then, in the following n lines, you will be given 2 integers (information for each expense):

  • the type: an integer between 1 and 3 ( 1 is Medical expense, etc.)
  • and the amount (base price before tax is added) an integer between 1 and 10,000

where 0 ≤ n ≤ 10,000.

Output specification
Show one number (with two digits after the floating point): total amount of tax to be paid.

Sample Input I
2
1 1000
3 500

Sample Input II
6
3 2000
2 1100
2 400
3 900
1 1900
3 500

Sample Output I
160

Sample Output II
944

Explanation for sample 1: The tax for the first item is 60leke and the tax for the second item is 100leke. So, the total amount of tax to be paid is 160leke.

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

www.contester.ru