[BOJ 8024] B-Smooth Numbers
View as PDF
Submit solution
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
Points:
1
Time limit:
1.0s
Memory limit:
128M
Problem types
Allowed languages
Let B be a positive integer. A natural number n is called B-smooth, if in its factorisation into primes there is no prime factor greater then B. We may say equivalently that a number n is called B-smooth, if it may be represented as a product of positive integers less then or equal to .</p>
Write a program which:
- reads from the standard input three positive integers n, m and B,
- determines the number of all B-smooth numbers in the interval [n,n+m] (inclusive),
- writes the result to the standard output.
In the first line of the standard input there are three integers n, m and B, separated by single spaces, 1 ≤ n ≤ 2,000,000,000, 1 ≤ m ≤ 100,000,000, 1 ≤ B ≤ 1,000,000.
출력 형식
Your program should write one integer in the first line of the standard output. It should be the determined number of B-smooth numbers.
예제 입력
30 10 5
예제 출력
4
Comments