#include using namespace std; const long long int MOD = 1000000007LL; long long int dp[200010][3][8][2][2]; long long int solve(string s, int P, bool include_equal) { int d = 0; while(P % 10 == 0) d++, P /= 10; int N = s.length(); memset(dp, 0, sizeof(dp)); dp[0][0][0][0][0] = 1; for(int i=0; i> A >> B >> P; long long int rr = solve(B, P, 1); long long int rl = solve(A, P, 0); cout << (rr - rl + MOD) % MOD << endl; return 0; }