Maybe there is a bug in the games, Java static variable

Hello everyone, I made the Thor light challenge with Java, it passed on every tests but when I validated the code, it seems the static variables were not recognized and almost all the tests failed, can’t I use static variables?

Thank you.

You can use static variables.

Yes, I can use, but in the validation of my code, it seems it does not work.

All my tests together worked in the option ‘play all’, just in the validation it not worked.

You can still PM me your code with Pastebin in the IRC chan, and i will tell you what’s wrong with your code.

One great advice for beginners on condingame : never think the problem is within codingame.

  • First try everything with what you know.

  • Then seek for help or guidance on the dedicated forum’s challenge post.

  • Then if you still don’t succeed send your code to codingame or any admin ; if there is an error on codingame side they will tell you but in something like 99% of cases it’s on user code :wink:

I think a lot of posts and topic on the forum could have been avoided if this was well-known.

3 Likes

But what is the reason of my code working in all the tests together and only in the time of the validation it does not work? I did not understand that.

But what is the reason of my code working in all the tests together and only in the time of the validation it does not work? I did not understand that.

The tests provided are similar to the validation tests used to compute the final score but remain different.

Are you sure you don’t have any hard-coded values in your code ?

Okay, I got 100%, I did Thor follow the light for everywhere. Thank you.