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 and each of them returns the exact expected output.|
|Partial Scores||When some of the 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 with the exact expected output.
When any of the test cases fail to return the exact expected output or fail to execute, the status is indicated as “Wrong Answer”.
Note: It is possible that your solution is correct but your test cases fail because the format of your output may not exactly match with 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: