Getting wrong answer even though the output is correct

Hello guys!
I am new to codechef, i tried solving this problem DDISH Problem - CodeChef
here is my submission CodeChef: Practical coding for everyone
Even though the code gives correct output, codechef won’t accept my solution.
Help would be appreciated!

Your solution can be ran with L,R small.

Here is example, with this test:

2

1 1000000000

2 12234567498778.

Your code ran to TLE, but the answer is:

5611770

Must know that if your code gave correct example test, it maybe failed on some test, i.e. trick test.

It’s need to check your algorithm you used to solve that problems. Good luck!

1 Like