Submit | All submissions | Best solutions | Back to list |
NOVICE21 - Problem 1 |
Given three Integers A, B, and N. Find how many integers between A and B (inclusive) are divisible by N. 0 <= A <= B <= 10^18, 1 <= N <= 10^18.
Input
First line contains T the number of test cases. Each of next T lines contains 3 integer A, B, N.
Output
For each test case print the answer in a new line.
Example
Input:
2
1 4 3
10 20 6
Output:
1
2
Added by: | Mahesh Chandra Sharma |
Date: | 2011-01-25 |
Time limit: | 0.209s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |
Resource: | NSIT Noivce contest #2 |
hide comments
2011-03-27 17:46:20 LeppyR64
There are blank lines in the input before t. Following that, the input matches the input description. If trying to solve this using C# you can create a try-catch block in a function to read t. |