Replace all pi prob

https://ide.codingblocks.com/s/41016
https://hack.codingblocks.com/contests/c/512/71
This code works fine in my system ide, but doesn’t in online ide,it runs fine when strings are i/p separately on the online ide but goes into infinite loop in case of 2nd sample i/p string given on hackerblocks, on online ide

In my system ide, all 3 sample cases work fine

Heyy @apoorvagupta96 ! there was some issue in your code .
You were missing with some corner cases . I have modified ur code here , check it out
https://ide.codingblocks.com/s/41020

thank you
I saw the changes, but that was due to some spaces or what?

Error will occur when the case i=s.length() is encountered .

okay, got it! thanks!