#P1095. 筛质数(一)
筛质数(一)
题目描述
给定一个正整数,请你求出1~n中质数的个数。
输入描述
共一行,包含整数
输出描述
共一行,包含一个整数,表示 1∼n中质数的个数。
样例1
输入
8
输出
4
说明
共有2、3、5、7四个质数。
给定一个正整数n(1≤n≤105),请你求出1~n中质数的个数。
共一行,包含整数n
共一行,包含一个整数,表示 1∼n中质数的个数。
输入
8
输出
4
说明
共有2、3、5、7四个质数。
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.