All Test Cases Accepted, but Marks me a Wrong Answer when Submitting
457

The solution I'm working on is for problem "Problem 12. Integer to Roman". I've tested my final solution in multiple IDE's with no issues, and have only correct/expected results.

When I plug my code into leetcode for the problem, and run the code, it comes back green and "Accepted." When I flip to the Testcase tab, I run a test for the number '4' (to see it correctly come back as 'IV'.) However, once I hit submit it marks me as a "Wrong Answer" (3 separate times because I've been trying to figure this out)... It says that user input '4' comes back as 'IIIIV'. That makes no sense to me, as I have tested it thoroughly, through several IDE's, and it even comes back accepted as the correct answer when I just run the code in leetcode.

Is there something I'm missing? I'm sure it's not the code. Is this a common problem?

Comments (1)