I coded this in C#, and I was able to pass all test cases, but when I submit for credit, it fails me on #2 and #7 giving me only 82%. The hint says “The following validators differ from the puzzle test cases to prevent hard coded solutions. This is why you can have some fails here even if all of the tests provided in the IDE have been successfully passed.” However, nothing is hard coded, all variables to work with any data sent, which is what I thought all the test cases were to test…so I have no idea how to fix it.
The message is just a reminder that a hardcoded solution will likely fail; the most important and more relevant part of the message is the first part, i.e. tests and validators are different. That is why your code can pass all the tests and still may fail one or more validators.
The case names alone should be sufficient for you to guess what the validators look like:
Validator 2 is named “-273 alone”. That should be self-explanatory.
Validator 7 is named “Two negative temperatures that are equal: {-10 -10}”. That should also be self-explanatory.
Try making custom cases accordingly; you should then have an idea of how to fix your code.