[BUGS] Temperatures

Hi, in the game Temperatures,
BUG1:
in the test 2, it gives this inputs: 5, 4, 2, 1 and ask the following outpout: 2. But according to what we have to do, it should be 1, because it is the closest to zero :confused: Did i missunderstood something?

BUG2:
The stuff which reads our output is broken: if you give back ‘-10’ it will just read ‘-’ and tell you it is not ok as if you outpouted a number :confused:

Thanks you for this great website!

EDIT: I think it matters to say that i am doing it in Javascript.

The input for test 2 is more like : -5 -4 -2 12 -40 4 2 18 11 5.
The puzzle has already been solved hundreds of times.

The validator read the output char by char and stop when the result is not as expected.

1 Like

Hello,
MrRoux is correct.
There is a bug with this test.

Here is the input:
n: 10
temps[0]: -3
temps[1]: 5
temps[2]: -16
temps[3]: -3
temps[4]: 4
temps[5]: -16
temps[6]: -3
temps[7]: 2
temps[8]: -16
temps[9]: 1

And here is the expected output:
Fail
Found: “1”
Expected: “2”

Best Regards,
Vladimir.

I just resubmited my solution. It works in Clojure and in Javascript. There is no bug.

You can check that the input is correct with:

var TEMPS = readline(); // the N temperatures expressed as integers ranging from -273 to 5526

printErr("TEMPS: "+JSON.stringify(TEMPS));

Can confirm, my solution in bash still passes. I doubt anything changed at all.

Ok thanks
oh god it is hawfull how i can do shit sometimes XD