 Number Formation
##### Submissions: 3696   Accuracy: 17.6%   Difficulty: Hard   Marks: 8

Given three integers x,y and z you need to find the sum of all the numbers formed by
having 4 atmost x times , having 5 atmost y times and having 6 atmost z times as a digit.

Note : Output the sum modulo 10^9+7.

Input
The first line of input contains of an integer 'T' denoting number of test cases. Then T test cases follow . The first line of each test case contains an three integers x , y and z .

Output:
For each test case print in a new line an integer corresponding to the answer.

Constraints:
1<=t<=50
0<=x,y,z<=100

Example:

Input:

1
1 1 1

Output:
3675

Explanation:
The ans for the input is
4+5+6+45+54+56+65+46+64+456+465+546+564+645+654=3675

#### ** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Hardik Gulati
Author: hardikgulati96

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.