problem is http://www.spoj.com/problems/DIV15
i'm not able to get the bug in my code.... it's giving TLE
Can someone suggest me for the edits in the code
http://ideone.com/6dvkFD // i hv put comments in my code
all testcases are working fine from my side
Uh, no, it isn't giving TLE. I submitted it and it gave WA. You missed one case — removing 7 and 4 to remove remainder 2. Add it and it should be AC — I don't know how you got TLE at all