Our site is dedicated to competitive programming. Competitive programming is a competition, where participants are presented with logical or mathematical problems which must be solved by computer programs. The goal of the participants is to write a program (solution) that will find the correct answer for the given input. For example, if a problem requires finding a square for a given number, the program should print 9 for the input 3, 16 if the input is 4 and so on.
The program must be executed within the time and memory limits defined in the problem statement. These limitations define how long your program can run and how much memory it can use. Programs that exceed these limits are terminated and no answer is accepted.
Probably one of the most exciting parts of competitive programming is how the solutions are checked. Unlike other competitions, where there is a group of people responsible for checking the answers, in competitive programming everything is checked by the program. That's right, your program (solution) is tested by another program.
When you send a solution, it is automatically picked up by the judge system (usually referred to as judge or online judge). It runs your program several times with different inputs and checks for the answers received. The more correct answers your program gives, the more points you get. The problem is solved if your program has given the correct answers to all the “questions” of the judge system.
Since your program is checked by an automatic system, you must strictly follow the format of input and output data. For example, if a problem asks to print two digits separated by a comma, but instead you printed numbers separated by a space, the system will not be able to understand your answer and won't consider it to be correct. This is an important detail, which is often forgotten by participants.
Normally, you have to read input data from the keyboard (stdin) and print it on the screen (stdout). Different programming languages provide different API for reading input and printing answers. Review solution examples, to learn more about how to write programs in language of your choice.
If you are ready to solve your first problem, learn how to send solutions on the site.