BlueBook - 10 Primes on a Line

View as PDF

Submit solution

Points: 5
Time limit: 1.0s
Memory limit: 16M

Problem type

A natural number N (greater than one), is a prime number if it has no natural number divisors other than 1 and N. Given an integer M, write a program that finds the first M primes, printing them ten to a line. Each number should be separated by a space.

Sample Input


Sample Output

2 3 5 7 11


There are no comments at the moment.