My code passes all test cases except 1 please check
hello @amanb25 sorry i am replying late .
i have seen your code and the problem was in your range on which you were working .
i have taken your range from 0 to 1e8 and now it is passing all the test cases .
https://ide.codingblocks.com/s/328249.
i hope i have cleared your doubt .
Happy Learning !!
okay thank you for the solution!!