All Submissions


You have to find the number of integers from 1 to 109 (both inclusive) that have sum of digits equal to S.

INPUT
The first line of input contains the number of test cases T.
Next T lines contains the integer S.

OUTPUT
For each test case print the number of such integers in separate line.

CONSTRAINT

0 < T <= 81
1 <= S <= 81


SAMPLE INPUT

1
1


SAMPLE OUTPUT

10


Problem Setter : Akshay Kumar


Languages: AWK,Bash,Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Python3,Ruby,Text

Time Limit: 1 Second(s)
Score: 100 Point(s)
Input File Limit: 50000 Bytes

Submit

Login to post clarification.

No Clarifications.

Contest

Mode Judge

Passive

Online

Overall Rankings

RankNameScore
1xyz0
2Ams0
3TIP0
4team420
5xyzz0
6asdasdasd0
7abcd0
8khankhan0
9Gabriel0
10gigel0