Income Bracket Tax Calculation
Income Bracket Tax Calculation
EasyArrays0% accepted
Meera files her annual income tax return. India's tax brackets are: 0-2.5L @0%, 2.5L-5L @5%, 5L+ @20%. She has her income distributed across these brackets. Calculate her total tax obligation.
Approach
Given array [amount0, amount1, amount2] taxed at [0%, 5%, 20%] respectively, return total tax payable.
Input
slabs=[250000,250000,500000]
Output
112500
More Arrays problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards