1423: ABC的整除问题
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:125
Solved:47
Description
给定三个非负整数 A,B,C,且保证A≤ B,C≠ 0,求在区间 [A, B] 中,存在多少个整数可以被C整除?
Input
第一行,一个整数 T,代表 T个测试样例。
接下来 T行,每行给出三个非负整数 A,B,C。
Output
共 T行,每行输出一个整数,代表在区间 [A, B] 中可以被C整除的数的数量。
1≤A≤B≤1e18,1≤C≤1e18
1≤A≤B≤1e18,1≤C≤1e18
Sample Input Copy
2
4 8 2
3 100 4
Sample Output Copy
3
25