Tax Calculation


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

You are tasked to calculate income tax for your friend Waldo Weirado.

The Canadian 2024 federal income tax bracket works like the following:

Tax Bracket Tax Rate Income Range (CAD)
First Bracket 15% $0 – $55,867
Second Bracket 20.5% $55,867 – $111,733
Third Bracket 26% $111,733 – $173,205
Fourth Bracket 29% $173,205 – $246,752
Fifth Bracket 33% Over $246,752

So, if you earn $40,000, you are taxed 15% of your income. If you earn $80k, the first $55,867 is taxed at 15%, while the rest (80,000-55,867=24,133) is taxed 20.5%.

Given an individual's income, you will need to calculate exactly how much they have to pay the federal taxman .

Input Specification

The first line contain a single integer number \(N\) (\(N<1000\)), indicating the annual income amount.

Output Specification

The first line should contain a single number accurate to 2 digits after the decimal point, which is the total amount of federal tax one has to pay.

The second line should contain another number, which represents the total percentage of one's income that's paid to the taxman.

Sample Input

88950

Sample Output

15162.06
0.17

Comments

There are no comments at the moment.