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

PROGRAMMING:Finding the number of prime numbers

Luz5年前 (2021-05-10)题库357
Find the number of prime numbers. This problem requires the preparation of a program to find the prime number of 1 ~ n. It is required to give at least two solutions. For the same N, the results of these two solutions are given. The purpose is to compare the absolute execution time of different solutions of the same problem, and realize how to design a "good" algorithm.
###Input format:
Input gives an integer n (< = 10 000 000) in one line.
###Output format:
For each group of inputs, output 1 ~ n prime numbers in a row.
###Input sample 1:
```in
five
```
###Output sample 1:
```out
three
```
###Input sample 2:
```in
fourteen
```
###Output sample 2:
```out
six
```







answer:If there is no answer, please comment