why is that runtime has suddenly started to pop out in every solutions i am submitting
plz…guys…help me up!!!for the above code.
Checkout these solutions, Solution 1 is same as yours (with a commented code line added on line number 12), which is getting Runtime Error. In Solution 2 I’ve uncommented line number 12 in your if condition for a = 1 to scan the input which you are not doing in your solution (I.e. you are not scanning the input if a is 1). I didn’t correct the logic of your solution and hence it is giving Wrong Answer now.
I hope this helps.