1572: B-smooth 数 - CCF-GESP2024年3月五级C++
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:7
Solved:6
Description
小杨同学想寻找一种名为 B-smooth 数的正整数。
如果一个正整数的最大质因子不超过 B,则该正整数为 B -smooth 数。
小杨同学想知道,对于给定的 n 和 B ,有多少个不超过 n 的 B -smooth 数。
Input
第一行包含两个正整数 n,B,含义如题面所示。
Output
输出一个非负整数,表示不超过 n 的 B -smooth 数的数量。
Sample Input Copy
10 3
Sample Output Copy
7
HINT
在不超过 10 的正整数中,B -smooth 数有{1,2,3,4,6,8,9},共7个。