TLE IN SMCD6

#include<stdio.h>
main()
{
long long int A,B,M,T,c,i;

scanf("%lld",&T);

for(i=0;i<T;i++)

{

scanf("%lld %lld %lld",&A,&B,&M);

c=(B-A)/M;

if(((B-A)%M)==0)

printf("%lld\n",c);

else

printf("%lld\n",c+1);

}

}

This Code gives TLE for SMCD6 while the same algo gets accepted for other C users please explain