300117: CF26A. Almost Prime
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:0
Description
Almost Prime
题意翻译
### 题目描述 一个数如果恰好有两个不同质因子,那它被叫做几乎是质数的数。例如:`6,18,24`就是几乎是质数的数,而`4,8,9,42`不是,请你找出 $1$ 到 $n$ 中几乎是质数的数有多少个。 ### 输入格式 输入仅包含一个整数 $n$($1\leq n\leq3000$)。 ### 输出格式 输出 $1$ 到 $n$ 中几乎是质数的数的数量。 Translated by Khassar题目描述
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.输入输出格式
输入格式
Input contains one integer number $ n $ ( $ 1<=n<=3000 $ ).
输出格式
Output the amount of almost prime numbers between 1 and $ n $ , inclusive.
输入输出样例
输入样例 #1
10
输出样例 #1
2
输入样例 #2
21
输出样例 #2
8