your algorithm is wrong and inefficient.Obaida wrote:What I need to to hear.... Is my algorithm wrong or Something wrong with my code please help me..... I am getting TLE...

try to find out all divisors of C-R, which are greater than R.

I used O(sqrt(C-R)) algorithm to avoid TLE.

to avoid wrong answer, consider the case where C=R.

and problem description explicitly says

Do not print trailing spaces.

you should consider this also.