PBCDIV - Phép chia hết

Tác giả: skyvn97

Ngôn ngữ: C++

#include<stdio.h>
typedef unsigned long long ull;
int t,c;
ull a,b,x,y,z;
int main(void) {
	scanf("%d",&t);
	for (c=1;c<=t;c=c+1) {
		scanf("%llu",&a);
		scanf("%llu",&b);
		x=b/12-(a-1)/12;
		y=b/30-(a-1)/30;
		z=b/60-(a-1)/60;
		printf("%llu\n",x+y-2*z);
	}
	return 0;
}

Download