#G5002. [GESP202403五级] B-smooth 数

[GESP202403五级] B-smooth 数

Description

⼩杨同学想寻找⼀种名为 B-smooth 数的正整数。

如果⼀个正整数的最⼤质因⼦不超过 B,则该正整数为 B-smooth 数。

⼩杨同学想知道,对于给定的 n 和 B,有多少个不超过 n 的 B-smooth 数。

Input Format

第⼀⾏包含两个正整数 n, B,含义如题⾯所⽰

Output Format

输出⼀个⾮负整数,表⽰不超过 n 的 B-smooth 数的数量。

10 3
7

Hint

image.png

Source

思码特OJ编程训练营 http://127.0.0.1