Piyush and Magical Park

What"s wrong with my code? Please help . Thnaks :))

Hey @aan there are couple of minor problems in your code,

  1. it is mentioned in question that if energy of piyush should remain greater than k.so whenever you decrease s you should check if it is greater than k
  2. whenever you encounter ‘#’ you dont need to decrease the energy
  3. in the case he cannot escape you need to print “No” but you are printing “no”