TVSH
After the new TVSH (Value Added Tax) regulation, government is planning some
changes now. There will be three types of taxes
- Medical expenses: 6%
- Educational expenses: 10%
- 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.
Для отправки решений необходимо