Question on Online Compiler

Back to General discussions forum

DecaHong     2023-11-25 01:49:09

Good day. I would like to ask a question regarding the online compiler, specifically in Java.

I was trying to run my code for a problem I am working on (Problem #34). And there is something I don't understand.

So, when I try to run my code with a smaller input size (the example - size 2), it works properly.

But, when I try to solve the actual input (size 8) it compiles but no output is shown.

I can confirm it is not a case of infinite loop or a syntax error since the program runs with output for size 2.

Would appreciate if you can provide me a hint as to why this is happening.

Thank you.

zelevin     2023-11-25 03:21:44

I doubt this has anything to do with the online sandbox.

Most likely you have a bug in your stopping criteria. Since floating point operations are inherently imprecise, perhaps your xMax (or whatever you called it) becomes, on some iteration, smaller than xMin?

DecaHong     2023-11-25 03:41:27

Hi zelevin,

Thank you for your insight.

I found out (via the Help section) that this was more of a limit in the server processing the answer.

I think it may be because my code takes more than 1 second to run, so it is not ideal to run it in the online sandbox.

References: https://www.codeabbey.com/index/wiki/suggest-a-problem (Section: On writing "checkers") https://www.codeabbey.com/index/wiki/running (Section: Executed on remote server)

I admit it was my fault of reporting this without consulting the Help section first.

Thank you.

Rodion (admin)     2023-11-28 04:07:03
User avatar

Hi Friends!

Thanks for notifying of this behavior, I'll try to have a look - surely, in case of timeout it would be preferable if some message is shown about this. Sorry for inconvenience :(

Please login and solve 5 problems to be able to post at forum