#P4252. B-smooth 数

B-smooth 数

Description

小杨同学想寻找一种名为B-smooth 数的正整数。 
如果⼀个正整数的最大质因子不超过B,则该正整数为B-smooth 数。 
小杨同学想知道,对于给定的n  和 B,有多少个不超过 n的 B-smooth 数。

Input Format

第一行包含两个正整数 ,含义如题⾯所⽰。
n<=1e6 , B<=1e6

Output Format

输出⼀个非负整数,表示不超过 的 B-smooth 数的数量。
10 3
7

Hint

在不超过 10的正整数中,B-smooth 数有 {1,2,3,4,6,8,9},共 7个

Source

gesp 五级 202403