For your convenience, HackerRank allows you to upload all test cases for a Coding or Approximate Solution question as a zip file. On the Test Cases tab of a coding question or an approximate solution question, there is an option to upload a zip file containing all the test cases. This is useful when our test case editing form is too small to type in a large input or output, the number of test cases is large, or you want to add all test cases by using your own editor. The input files in the zip are named input000.txt, input001.txt, and so on. The output files are named output000.txt, output001.txt, and so on.
The structure of the directory that is compressed into a .zip file should have the following format:
- It should only contain files without any other sub-directories
- Provide two files for each test case. One file should contain input and the corresponding file should contain the output for the test case. Name the input file as "input" followed by a number, and save it as .txt file. Similarly, name the output file as "output" followed by a corresponding number and save it as .txt file.
|Input File Name||Corresponding Output File Name|
- For a given test case, the input and output files need to be associated with each other. The numbers in the input and output file names should match for them to be associated. For example, input0.txt and output0.txt are combined into a test case, as is input002.txt and output002.txt.
A coding problem example along with sample input and output test cases is given below:
For an integer N, print the string 'Hello World' N times, each in a single line. Write complete compilable code. Your code should not print anything extra to the standard output. Please refer to sample test cases.
A single integer N (read from standard input)
N lines of the string 'Hello World' (printed to standard output)
Contents of input00.txt
Contents of output00.txt
Contents of input01.txt
Contents of output01.txt