#include<stdio.h>
#include<math.h>
typedef struct
{
int d, m, y;
} Date;
int isLeap(int y)
{
return (y%4==0)&&(y%100!=0)||(y%400==0);
}
int diff(Date d1, Date d2)
{
int dd1=0, dd2=0, y, yref;
yref=(d1.y<d2.y)?d1.y:d2.y;
for(y=yref;y<d1.y;y++)
if(isLeap(y))
dd1++;
if(isLeap(d1.y) && d1.m>2) dd1++;
dd1+=daysTill(d1.m)+d1.d+(d1.y-yref)*365;
for(y=yref;y<d2.y;y++)
if(isLeap(y))
dd2++;
if(isLeap(y) && d2.m>2) dd2++;
dd2+=daysTill(d2.m)+d2.d+(d2.y-yref)*365;
}
int daysTill(int month)
{
int days=0;
switch(month)
{
case 1: days=0;
break;
case 2: days=31;
break;
case 3: days=59;
break;
case 4: days=90;
break;
case 5: days=120;
break;
case 6: days=151;
break;
case 7: days=181;
break;
case 8: days=212;
break;
case 9: days=243;
break;
case 10:days=273;
break;
case 11:days=304;
break;
case 12:days=334;
break;
}
return days;
}
main()
{
int t;
Date d1, d2;
while(t--)
{
scanf("%d %d %d",&d1.
d,&d1.
m,&d1.
y); scanf("%d %d %d",&d2.
d,&d2.
m,&d2.
y); }
}
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8bWF0aC5oPgp0eXBlZGVmIHN0cnVjdAp7CglpbnQgZCwgbSwgeTsKfSBEYXRlOwppbnQgaXNMZWFwKGludCB5KQp7CglyZXR1cm4gKHklND09MCkmJih5JTEwMCE9MCl8fCh5JTQwMD09MCk7Cn0KaW50IGRpZmYoRGF0ZSBkMSwgRGF0ZSBkMikKewoJaW50IGRkMT0wLCBkZDI9MCwgeSwgeXJlZjsKCXlyZWY9KGQxLnk8ZDIueSk/ZDEueTpkMi55OwoJZm9yKHk9eXJlZjt5PGQxLnk7eSsrKQoJCWlmKGlzTGVhcCh5KSkKCQkJZGQxKys7CglpZihpc0xlYXAoZDEueSkgJiYgZDEubT4yKSBkZDErKzsKCWRkMSs9ZGF5c1RpbGwoZDEubSkrZ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