Marks :10
: 23 | : 1
Given two strings, $$$num1$$$ and $$$num2$$$ containing digits from $$$0$$$ to $$$9$$$ that represent two integers. You are also given two integers, $$$minsum$$$ and $$$maxsum$$$. Find the number of integers $$$x$$$ such that $$$num1 \leq x \leq num2$$$ and $$$minsum \leq$$$ sum of digits of x $$$\leq maxsum$$$. As the answer can be huge, print it modulo $$$1e9+7$$$.
The first line of the input contains two space seperated strings, $$$num1$$$ and $$$num2$$$. ($$$num1 \leq num2$$$ and $$$1 \leq len(num2) \leq 100$$$)
The second line of input contains two space separated integers, $$$minsum$$$ and $$$maxsum$$$ ($$$minsum \leq maxsum$$$ and $$$1 \leq maxsum \leq 1e5$$$)
Output a single integer, the answer modulo $$$1e9+7$$$.
18 26 3 7
5
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.