Hello everyone, i start with codingame just today
But i have trouble with temperatures puzzle.In short.
My loop for checking all temperatures is:
…
char tempx = 5527;
for (int i = 0; i < 257; i++) {
if (temps[i] < tempx && temps[i] != 0)
tempx = temps[i];
fprintf(stderr, "%d", temps[i]);
}
…
But my output of that is:
"“45, 49, 50, 32, 45, 53, 32, 45, 49, 51, 55, 10, 0, 127, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 61, 87, -34, -9, -1, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -120, -58, -2, -9, -1, 127, 0, 0, 1, 0, 0, 0, -1, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 127, 0, 0, -88, -31, -1, -9, -1, 127, 0, 0, -64, 59, -115, -9, -1, 127, 0, 0, 64, 52, 108, -9, -1, 127, 0, 0, -64, 59, -115, -9, -1, 127, 0, 0, 64, -80, -35, -9, -1, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -27, -1, -9, -1, 127, 0, 0, -16, -23, -1, -1, -1, 127, 0, 0, -32, -23, -1, -1, -1, 127, 0, 0, 46, 78, 61, -10, 0, 0, 0, 0, -107, 4, 64, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -88, 97, -18, -10, -1, 127, 0, 0, 0, -64, -2, -9, -1, 127, 0, 0, -7, -19, -1, -1, -1, 127, 0, 0, 96, -64, 39, -9, -1, 127, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -99, 9, 64, 0, 0, 0, 0, 0, 96, -64, 39, -9, -1, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 9, 64, 0, 0, 0, 0, 0, -16, 6, 64, 0, 0, 0, 0, 0, 48, -120”…
But 2 test case “only negatives” wants -5 for output but there is not any -5, so how i can receive it as a result ? Or maybe im fail in stderr check ?