5388 - GESP:2024-3月等级5-T2-B -smooth 数
Time Limit : 1 秒
Memory Limit : 128 MB
小杨同学想寻找一种名为 B-smooth 数的正整数。
如果一个正整数的最大质因子不超过 B,则该正整数为 B-smooth 数。
小杨同学想知道,对于给定的 n 和 B,有多少个不超过 n 的 B-smooth 数。
Input
第一行包含两个正整数 n,B,含义如题面所示。
Output
输出一个非负整数,表示不超过 n 的 B-smooth 数的数量。
Examples
Input
10 3
Output
7
Hint
【样例解释】
在不超过 10 的正整数中,3-smooth 数有 1,2,3,4,6,8,9,共 7 个。
对于全部数据,保证有 1≤n≤10^6,1≤B≤10^6。