In your HackerRank Tests, typically, the score for your coding solution is calculated and assigned based on the number of test cases that execute your logic successfully to produce the exact expected output.
Your test setter may include one or more test cases to validate your solution to a coding problem. These test cases are automatically executed when you run your code, and they validate different simple and corner scenarios using your solution to return the output. The execution status of each test case is displayed separately.
Based on the overall test case results, you will achieve:
A Full Score | When all the test cases pass, each of them returns the expected output. |
Partial Scores | When some test cases pass with the exact output, you gain scores for the successful test cases. |
No Score | When none of the test cases pass or execute to produce the expected output. |
A test case is marked as "Success" when the output from your solution matches the expected output.
When any of the test cases fail to return the expected output or fail to execute, the status is indicated as "Wrong Answer."
Note: Your solution may be correct, but your test cases fail because the format of your output may not exactly match the format of the expected output. To pass the test cases, you must write the output from your code in the exact expected format. Refer to the Failed Test Cases or "Wrong Answer" Status topic for more information.
For detailed information about test cases in your coding questions, refer to the following topics: