As you will see on the HackerRank site, all the exam problems require you to write a program that will read some input, which you must then process in a way specified in the problem statement, and produce an output in a specific format. You must write your solution in a single file (Java programmers, note that you can include additional top-level classes in a single source file as long as they are unqualified: just "class", without "public")
The format of the input and output is described in each exercise, and you must follow them rigorously. Each problem includes some sample input/output data that you can use to test your solution. Take into account that we will also test your solution with larger test cases.
All input is read from standard input (i.e., it is read “from the console”). You can assume that all input is correct and meets the specifications given in the problem statement; do not waste time validating the input. All output should be printed to standard output. Anything printed to standard error will be ignored (i.e., you can use standard error to print debugging statements).
As you work through past exam problems, you'll notice that the input/output requirements are very similar across problems. In particular, it is useful to think of the input as a stream of tokens (with each value, or token, separated by a space or a newline). All modern programming languages include libraries to easily read in this kind of data, without having to read in the file byte by byte or doing any complicated parsing. In particular, you may want to look at:
Note: You are not limited to using just the above mechanisms. They are just suggestions; if you have another preferred method of reading tokenized input in your programming language of choice, you are welcome to use it (as long as it doesn't require using external libraries not included with the language's standard library).