Power of thor

whenever I run my code the following message appears
“Timeout: your program did not provide an input in due time. Earth was destroyed!”
what’s that suppose to mean?

It means that CodinGame did not get an input from your program. This can happen when

  • You do not output anything
  • You forgot to add a \n at the end of your input
  • Your code takes a long time to execute, beyond the specified time limit.
  • etc
1 Like

Same problem here! Still couldnt find out how to “provide an input in due time”!! Something with the split() method? The string[] input array contains the x,y coordinates of the light, and thor’s starting position! Can’t figure out what else should i do to “provide an input”. It was already auto-generated! pls help!

You have to use the function that writes something to the standard-out stream. The name of the function depends on the language you are using. In Java it’s called System.out.println, in C it’s printf, you get the picture. An example should be included in the autogenerated code.

Also take a look at the previous post.

I’ve already made it! Thanks the help btw! :

I’ve having this issue as well. Thor is at (30,4), and the light is at (31,4) by the end of the testcases. I essentially just followed the peusdocode in the given hint. If I add print("\n"), then it comes back with “Expected a movement (one of N, NE, E, SE, S, SW, W, NW) but found ‘’”. Don’t know what the problem is.