HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > Epoka Science Olympiad 2016 > problem:


10-5. 50966 - TVSH

Epoka Science Olympiad 2016

Start: Apr.11.2016 at 02:07:57 PM
Finish: Apr.24.2016 at 05:00:00 AM
The contest is finished!
• Contest scoreboard

Contest problems

• 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

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.

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