PIYUSH AND MAGICAL PARK

PLEASE TELL ERRORS IN MY CODE

hi @Mayankrocks
refer this -->

caN U TELL ERRORS IN MY CODE

hi @Mayankrocks
first thing u will have to do in for loop will be

if(s<k){
       success=false;
       break;
}

only then u can perform other computations…
I have corrected ur code… Its working fine and passing all test cases now…

i am actually very tensed so can u tell was my thinking right?

basically i want to ask there were not much errors in my code ?

yes @Mayankrocks
u were going in the right direction… there are only minor changes i have done in ur code…

ok thanks
send feedback link

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.