You are given a string S of length N. You are also given an integer K. The string consists of digits from 1−9 only. Determine the number of ways to partition the string S such that each segment value is less than K.
If there is no way to perform partition on the string, then print 0.
Since the answer could be a large, print the answer as 109+7.
Input format
Output format
Print the required answer.
Constraints
1≤T≤51≤N≤1051≤K≤1018
In first testcase, We have only one way to partition i.e 3,4,2,1,2.
In second testcase, we can partition in it two ways: 1,1 and 11