Yukikaze and Smooth numbers

TimeLimit:3000MS  MemoryLimit:524288KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
Yukikaze is learning number theory. In number theory, a $k$-smooth number is an integer whose prime factors are all less or equal to $k$ . Given $n$ and $k$, she wants to know how many $k$-smooth numbers are less or equal to $n$.
Input
The input contains several test cases, and the first line contains a single integer $T(1≤T≤50)$, the number of test cases. Each of the next T lines contains two integers $n(1 \leq n \leq 10^9), k(1 \leq k \leq 10^9)$, denoting the question described above.
Output
For each test case, output the answer in a single line.
SampleInput
5
13 2
75 18
38 8
24 7
62 9
SampleOutput
4
54
25
18
34
Submit
题目统计信息详细
总AC数0
通过人数0
尝试人数0
总提交量0
AC率0.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: