Help me in solving VOLCONTROL problem

My issue

My code

#include <stdio.h>

int main(void) {
	int T; 
	int X; 
	int Y; 
	int countj;

	scanf("%d", &T);
	
	for(int i = 0; i < T; i++)
	{
	    scanf("%d %d ", &X , &Y);
	    
	    for(int j = X; j < Y; j++)
	    {
	        countj++;
	    }
	}
	
	         printf("%d",countj);
	return 0;
}


Problem Link: VOLCONTROL Problem - CodeChef

After taking input from user(i.e X and Y values) check the condition like X>=Y if yes then print X-Y else print Y-X