-->
当前位置:首页 > 题库

PROGRAMMING:Output all prime numbers from 2 to n

Luz5年前 (2021-05-10)题库385
This problem requires the output of all prime numbers between '2' and 'n', and output '10' per line. A prime is a positive integer that can only be divided by one and itself. Note: 1 is not a prime, 2 is a prime.
###Input format:
The input gives an integer in a long integer range on one line.
###Output format:
Output prime number, each number occupies 6 bits, each line outputs 10. If the number of prime output in the last line is less than 10, you also need to wrap the line.
###Input example:
```in
ten
```
###Output example:
```out
2 3 5 7
```







answer:If there is no answer, please comment