#K64472. Distinct Prime Factors of a Factorial
Distinct Prime Factors of a Factorial
Distinct Prime Factors of a Factorial
Given an integer (M), compute the number of distinct prime factors of (M!) (i.e. the factorial of (M)). Recall that (M! = 1 \times 2 \times \cdots \times M) contains every integer up to (M), and a prime factor (p) appears in (M!) if and only if (p \le M). In other words, the task reduces to counting the number of prime numbers in the interval ( [2, M] ).
inputFormat
The input consists of a single integer (M) (where (1 \le M \le 10^5)) provided via standard input.
outputFormat
Output a single integer representing the number of distinct prime factors of (M!).## sample
1
0