{"problem":{"name":"[GESP202403 五级] B-smooth 数","description":{"content":"小杨同学想寻找一种名为 $ B $-smooth 数的正整数。  如果一个正整数的最大质因子不超过 $ B $，则该正整数为 $ B $-smooth 数。小杨同学想知道，对于给定的 $ n $ 和 $ B $，有多少个不超过 $ n $ 的 $ B $-smooth 数。","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":524288},"difficulty":{"LuoguStyle":"P2"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGB3969"},"statements":[{"statement_type":"Markdown","content":"小杨同学想寻找一种名为 $ B $-smooth 数的正整数。 \n\n如果一个正整数的最大质因子不超过 $ B $，则该正整数为 $ B $-smooth 数。小杨同学想知道，对于给定的 $ n $ 和 $ B $，有多少个不超过 $ n $ 的 $ B $-smooth 数。\n\n## Input\n\n第一行包含两个正整数 $ n $ 和 $ B $，含义如题面所示。\n\n## Output\n\n输出一个非负整数，表示不超过 $ n $ 的 $ B $-smooth 数的数量。\n\n[samples]\n\n## Background\n\n对应的选择、判断题：<https://ti.luogu.com.cn/problemset/1145>\n\n## Note\n\n### 样例解释\n\n在不超过 $10$ 的正整数中，$3$-smooth 数有 ${1,2,3,4,6,8,9}$，共 $7$ 个。\n\n### 数据规模与约定\n\n| 子任务 | 得分 | $n \\leq $ | $B$ |\n| :-: | :-: | :-: | :-: |\n| $1$ | $30$ | $10^3$ | $1 \\leq B \\leq 10^3$ |\n| $2$ | $30$ | $10^6$ | $\\sqrt n \\leq B \\leq 10^6$ |\n| $3$ | $40$ | $10^6$ | $1 \\leq B \\leq 10^6$ | \n\n对全部的测试数据，保证 $1 \\leq n, B \\leq 10^6$。","is_translate":false,"language":"English"}],"meta":{"iden":"LGB3969","tags":["2024","素数判断,质数,筛法","GESP"],"sample_group":[["10 3","7"]],"created_at":"2026-03-03 11:09:25"}}