{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"PLAIN","content":"Một số là số ma thuật với bậc d nếu như chữ số d sẽ và chỉ xuất hiện ở các vị trí chẵn.\n\nVí dụ: 152535 là số ma thuật bậc 5 còn 515253 không phải.\n\nTìm số các số ma thuật bậc d trong khoảng từ a đến b mà là bội của m. In ra ở mod 1e9+7."}},{"title":"Input","value":{"format":"PLAIN","content":"1 \u003c\u003d m \u003c\u003d 2000\n0 \u003c\u003d d \u003c\u003d 9\na, b \u003c\u003d 10^2000"}},{"title":"Examples","value":{"format":"PLAIN","content":"Input\n2 6\n10\n99\nOutput\n8\nInput\n2 0\n1\n9\nOutput\n4\nInput\n19 7\n1000\n9999\nOutput\n6"}}]}