HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Economics & Finance > problem:


50806 - TVSH

Guest
• Review clarifications (1)

Section problems

• 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

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.
Question by Ibrahim Mesecan.

TVSH

Shqip

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