Problems
Mega Cool Numbers
Mega Cool Numbers
A positive integer is called a cool number of power \textbf{a} if it can be separated into exactly \textbf{a} groups of consecutive digits, where the digits in each group form an arithmetic progression. An arithmetic progression is a sequence of numbers in which the difference between any two consecutive numbers is the same. A positive integer is called a mega cool number of power \textbf{a} if it is a cool number of power \textbf{a}, not a cool number of power \textbf{a}-\textbf{1}, and all its digits are in non-decreasing order.
Determine the number of mega cool numbers of power \textbf{a} that contain exactly \textbf{n} digits (with no leading zeroes). Print this number modulo \textbf{1000000007}.
\InputFile
Each line contains two integers \textbf{n} and \textbf{a} (\textbf{1} ≤ \textbf{n}, \textbf{a} ≤ \textbf{1000}).
\OutputFile
For each line of input print in a separate line the number of mega cool numbers of power \textbf{a} that contain exactly \textbf{n} digits (with no leading zeroes). The output numbers must be printed modulo \textbf{1000000007}.
Input example #1
1 1 2 1 10 3
Output example #1
9 45 7502