Instruction For Coding Contest
Instruction For Coding Contest
Contest…!!
INSTRUCTIONS :
Upcoming Contest Instructions for Participants:
1. Input Handling:
- During the contest, the system will automatically provide input to your code. You
must use the input() function in Python (or the equivalent in other languages) to
capture the input data. This will allow your program to read input directly from the
system.
- In Java, you would typically use the Scanner class like this:
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(); // to take an integer input
- The input will be given in the format specified in the problem statement. Be sure
to read the problem carefully to understand how the input is structured.
3. Output:
- After processing the input, your program must output the result exactly as
specified in the problem description.
- Make sure you format the output properly, such as printing each element of the
array on a new line if specified.
4. Code Submission:
- The system will evaluate your solution against multiple test cases. Your code
should work correctly for all provided test cases, as well as any hidden ones that the
system runs after you submit.
- Ensure that your solution works efficiently within the given constraints.
5. Additional Guidelines:
- Do not modify the function signatures or the template provided in the problem.
Implement your solution in the given function body.
- Efficiency matters: Try to optimize your code to work within the time and space
constraints. If a problem has large inputs, think about the time complexity of your
solution.
- Test edge cases: Make sure your solution handles edge cases (e.g.,
smallest/largest inputs, empty inputs) properly.
6. Error Handling:
- Your code should gracefully handle any potential errors, such as invalid input or
other exceptions.
- The program should not enter infinite loops or throw unexpected errors during
execution.
7. Reminder:
- You must use the input() function in Python (or the equivalent in other languages)
to read inputs. This will be the way the system will feed the input to your program.
8. Good Luck:
- Make sure you’re ready to go when the contest starts. We encourage you to
practice and explore the HackerRank environment beforehand.
- Keep an eye on the problem description for any specific instructions or
constraints.
We’re looking forward to seeing your solutions! If you have any questions, feel free to
reach out to us during the contest.