CF26A.Almost Prime
入门
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
A number is called almost prime if it has exactly two distinct prime divisors. For example, numbers 6, 18, 24 are almost prime, while 4, 8, 9, 42 are not. Find the amount of almost prime numbers which are between 1 and n, inclusive.
一个数被称为“近似质数”,当且仅当它恰好有两个不同的质因数。例如,6、18、24 是近似质数,而 4、8、9、42 则不是。求在 1 到 n(含端点)之间近似质数的个数。
输入格式
Input contains one integer number n (1 ≤ n ≤ 3000).
输入包含一个整数 $ n ( 1 \leq n \leq 3000 $)。
输出格式
Output the amount of almost prime numbers between 1 and n, inclusive.
输出在 1 到 n(含)之间的准素数(almost prime)的个数。
输入输出样例
输入#1
10
输出#1
2
输入#2
21
输出#2
8
输入解题思路,AI测评打分。不知道怎么写?