using System;
class spoj8214
{
static void Main()
{
//Spoj 8214: determina cuantos numeros entre a y b son divisible entre n
bool esValido= false;
long numero;
esValido = long.TryParse(Console.ReadLine (), out numero);
while (!esValido)
{
esValido = long.TryParse(Console.ReadLine(), out numero);
}
long T = numero;
long A, B, N, t, d, l=0;
long[] G = new long[T];
for (t = 1; t <= T; t++)
{
LeeABN(out A, out B, out N);
dividir(out d, A, B, N);
G[l] = d;
l++;
}
for (long s = 0; s < T; s++)
{
Console.WriteLine(G[s]);
}
}
static void LeeABN(out long A, out long B, out long N)
{
string a;
string[] num = new string[3]; // arreglo del string
a = Console.ReadLine();
num = a.Split(' ');
A = Convert.ToInt64(num[0]);
B = Convert.ToInt64(num[1]);
N = Convert.ToInt64(num[2]);
}
static void dividir(out long d, long A, long B, long N)
{
d = 0;
for (long c = A; c < B; c++)
{
if (c % N == 0)
d += 1;
}
}
}
Time Limit Exceed