Hide

Problem I
Frumtölur

Languages en is

Welcome to Forritunarkeppni Framhaldsskólanna! IF you have competed before you might know that the problem authors are smitten with primes. For you newcomers a brief description of prime numbers follows.

An integer $N$ is considered to be prime if it can only be divided by $1$ and $N$. For example $10$ is not prime because it can be divided by $1$, $2$, $5$ and $10$. On the other hand $11$ is a prime number because it can only be divided by $1$ and $11$. In the same way we see that $2$, $3$ and $17$ are primes but $4$, $9$ and $15$ aren’t.

In this first problem we ask you to write a program that finds the first $100$ primes. The program may print the primes in any order it likes and it does not need to print all of them. The solution gets one point for each prime it prints, so the more the better. If the program prints a number that’s not among the first $100$ primes, it will get $0$ points.

Input

There is no input.

Output

The first hundred primes, or a subset of them, in any order. Each number should be on its own line.

Explanation of Sample Inputs

In the sample the first five primes are printed. A solution printing these five numbers gets $5$ points.

Sample Input 1 Sample Output 1
2
3
5
7
11

Please log in to submit a solution to this problem

Log in