Your practice code will not run
Run checks your code against the sample cases and the hidden tests. The results under the editor say what happened, and a message at the corner of the page says when the run itself did not work.
Read the results
- The results say how many tests passed, with each sample case and hidden test marked Pass or Fail.
- A failing hidden test shows as Hidden test and its number, with the kind of failure: Wrong answer, Runtime error with the error name, Compilation error, Time limit exceeded or Could not run. You do not see its input or its expected output.
- Time limit exceeded means your code ran too long. Look for a loop that never ends.
- Open a failing sample case to see the Input, the Expected output and Your output side by side. Nothing was printed means your code produced no output.
Run, then submit
- Choose Run. It checks the sample cases and the hidden tests together.
- Fix what fails and run again.
- If the page has an Explanation tab, write your explanation. Submit needs it, and the tab says needed to submit until you have.
- Choose Submit. If a test fails, the message says Some tests failed and how many passed, for example 3 of 5 passed. Fix the failing ones and submit again.
- When every test passes, the solve is saved at once. The page says Problem solved and shows the XP you earned.
If you see a message
- Write some code first, then run it: the editor is empty. Write your solution first, then submit it is the same for Submit.
- Code not run: the run did not finish. Check your connection and choose Run again.
- Not saved yet, Run your code again, then submit: Submit needs a passing run of this problem from the last 30 minutes. Run again, then submit.
- Solve not saved: choose Submit again in a moment. If the message gives a reason, do what it says.
- Solution not submitted: the message says why. Check your connection and submit again.
If it still will not run
- Reload the page, then run again. Your code is kept in this browser.
- Check that the language you picked is the one your code is written in.
- If something looks wrong with the problem itself, report it.
- Still stuck? If you are signed in, write to us from the help button in the app and name the problem. If you cannot sign in, write to us from Sign-in help.
Did this answer your question?