const prime = Array(1e9).fill(true);
produced the output:
Standard Output Stream:
It seems like an issue with CodinGame that some error isn’t reported in the IDE. Would it be possible to ensure an error message is printed? Even “process exited with exit code 1” would be better than seeing nothing.
We could probably but that would be hard to implement on our side. JS does not go out of memory, it is killed by the jail (oom killer of the memory cgroup) because it goes beyond the allocated memory for the jailed process.
We already have a feature filed for this but don’t expect a quick resolution.
Personal note: A “billion” elements, really? for a CodinGame puzzle?
I can confirm a similar problem for C++. Segfaults are not sent to the console.
That’s reasonable, thanks. Is there some different bug tracker I could have searched before posting? (I didn’t want to create a duplicate, but nothing on this forum seemed similar).
Aha, I miscounted–the problem only requires checking up to 8-digits numbers, so that’s 10x too much. But looking at the CodinGame limits I think with a proper bitset a billion bits would fit.
Well, to be true, you shouldn’t complain about limits but about a wrong approach to a solution.
An array of 1 billion items?, That’s insane for a problem of this kind.