Guess the LOGIC!!!

3.7

3 votes
Implementation, Bit manipulation
Problem

Guess the relation between the given input and output from the sample.

Scoring:

If the number of characters in code 120, then Score=100 

else

Score=max(0,m), where m=(1200number of characters in code)/12

 

Input

The first line contains the number T, the number of test cases

Next T lines contain a single number n

Output

Apply the logic and print the output for each test case in a single line

Constraints:

1T105

1n109

Sample Input
10
10
8
23
6
1000
54
1
22
100
2
Sample Output
2
1
4
2
6
4
1
3
3
1
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?