Why this is not working for this Question?
https://codeforces.com/problemset/problem/484/A?mobile=true
Why this is not working for this Question?
The range of l and r is 10^18, so you can’t check every number between them, therefore your code is incorrect. Check this implementation https://ide.codingblocks.com/s/228627
Sir What if I use long long here, Please check the code again
And When I am passing the test case being given there, I am just passing int values, even then it is not giving correct output. Why So, Please tell?
No it simply won’t work for 2 reasons.
- The size of d array is b-a+1 which can of the order of 10^18 and that much space is not allowed.
- Even if that much space was allowed , you aren’t allowed to run such a big loop in which you check every number from a to b, it would give TLE.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.