Why my code is giving wrong output?>

Hello @dhruvilcodes i have corrected your code and commented the mistake:


if you have any doubt you can ask here:
Happy Learning!!

1 Like

but same solution giving wrong answer on SPOJ, I got your solution but I am unable to submit on SPOJ. please help me with that.

please share the link of the spoj for this:

@dhruvilcodes i have made all the necessary changes in the code and now it is passing all the test cases on spoj.


Happy Learning!!

1 Like