• + 2 comments

    If anyone solve the problem in C but fail only on test case 1, comment out the "exit". Test case 1 has bad input, last char == -47 (signed) or 209 (unsigned), not '\0' regardless.

    if (a_item_endptr == a_item_str || *a_item_endptr != '\0') { // exit(EXIT_FAILURE); }