Tax Calculator
People of a certain country have a little interest in paying tax. This is not the case that they do not love the country or they do not want to obey the law, but the problem is the complex calculations for payable tax. Most of the people do not understand the rule and some lawyers take high charges to help(?) them. So, most of the people just avoid paying tax. Realizing this, the Government decided to automate the taxpaying system and appointed you to program a tax calculator that takes a persons yearly income as input and calculate the payable tax for him. Here is the rule for calculate payable tax for an individual:
- The first 180,000/- of income is tax free.
- Next 300,000/- will have 10% tax.
- Next 400,000/- will have 15% tax.
- Next 300,000/- will have 20% tax.
- The rest will have 25% tax.
- The minimum payable tax will be 2,000/-. That is if anyones tax is below 2,000/- (but of course greater than zero) he must pay 2,000/-
- The payable tax must be an integer. If the calculated tax is a floating point then it must be replaced by the smallest integer greater than the payable tax.
Input
The first line of input will contain an integer T (T ≤ 5000) which denotes the number of test cases. Each of the following T lines contains an integer k (1 ≤ k ≤ 109).
Output
For each line of input output the case number and an integer which is the payable tax for the given income.
Illustration of 3rd sample:
Sample Input
3
180001
12345
615000
Amount Rate Tax
180000 0% 300000 10% 135000 15%
Total
0
30000
20250
50250
2/2 Sample Output
Case 1: 2000
Case 2: 0
Case 3: 50250