You are given three integers $$$l$$$, $$$r$$$ and $$$k$$$. Find the number of pairs $$$(a, b)$$$ such that $$$l$$$ $$$\leq$$$ $$$a$$$ $$$\leq$$$ $$$b$$$ $$$\leq$$$ $$$r$$$ and $$$\frac{LCM (a, b) }{GCD (a, b)}$$$ $$$=$$$ $$$k$$$.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ $$$(1$$$ $$$\leq$$$ $$$t$$$ $$$\leq$$$ $$$100)$$$.
The first (and only) line of each test case contains three integers $$$l$$$, $$$r$$$ and $$$k$$$ $$$(1$$$ $$$\leq$$$ $$$l$$$ $$$\leq$$$ $$$r$$$ $$$\leq$$$ $$$10^9$$$, $$$1$$$ $$$\leq$$$ $$$k$$$ $$$\leq$$$ $$$10^9)$$$.
For each test case, print a single integer — the number of pairs.
51 20 55 15 620 23 311 2022 1811 111 1
4 3 0 321 101
In the second test case, the pairs are (6, 9), (8, 12), (10, 15).