PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000078. Đếm số có ít nhất k ước nguyên tố (030 - K Factors)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Đếm số có ít nhất k ước nguyên tố (030 - K Factors)
030 - K Factors
Source: AtCoder
Version: Phuoc Hung OJ Extended
Problem Statement
Given integers and , consider for every integer from through the number of its distinct prime divisors. Count how many such integers have at least distinct prime divisors. Repeated occurrences of a prime factor count only once; e.g. has two distinct prime divisors.
Input
One line contains integers and .
Output
Print the count of integers with and at least distinct prime divisors.
Subtasks
- Subtask 1 (20 points): ; .
- Subtask 2 (30 points): ; .
- Subtask 3 (50 points): ; .
Examples
Input
15 2
Output
5
Explanation
The values at most with at least two distinct prime divisors are , , , , and . There are five such numbers, so print 5.