You are given integers , and you have to say how many integer are there in range [l,r]
such that
use sqrt decomposition ds
The first line contains a single integer (1\le t\le 10^3) the total number of test cases.
Each test case contains integers , (0\le l\le r\le 10^9) and (1\le p\le 10^5).
Print the total number of in the range [l,r].
Example 1
In first test case 1,5,8,9 satisfy the condition so the answer is .
Subtask ( points) : (p=1)
Subtask ( points) : r\le 10^3
Subtask ( points) : \sum r-l \le 10^6
Subtask ( points) : No additional constraints.