semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
void main()
{int a[2],b[2],c[2],m[12]={31,28,31,30,31,30,31,31,30,31,30,31},r=29;
 int i,k=0,total=0,num,sum[2];
 scanf("%d %d %d %d %d %d",&a[0],&b[0],&c[0],&a[1],&b[1],&c[1]);
 for(i=a[0];i<a[1]+1;i++)
	 if((i%4==0&&i%100!=0)||(i%400==0)) k++;
 total=366*k+365*(a[1]+1-a[0]-k);
 if((a[0] % 4 == 0 && a[0] % 100 != 0) || (a[0] % 400 == 0))
    m[1]=r;
 sum[0]=0;
 for(i=0;i<b[0]-1;i++)
	sum[0]+=m[i];
 sum[0]=sum[0]+c[0];
 if((a[1] % 4 == 0 && a[1] % 100 != 0) || (a[1] % 400 == 0))
    m[1]=r;
 else m[1]=28;
 sum[1]=0;
 for(i=11;i>b[1]-2;i--)
	sum[1]+=m[i];
 sum[1]=sum[1]-c[1];
 num=total-sum[0]-sum[1];
 printf("%d\n",num);
}
int main()
{
  int sY,sM,sD,eY,eM,eD,sN,eN,N,num(int Y,int M,int D);
  scanf("%d%d%d\n%d%d%d",&sY,&sM,&sD,&eY,&eM,&eD);
  sN=num(sY,sM,sD);
  eN=num(eY,eM,eD);
  N=eN-sN;
  printf("%d",N);
  return 0;
}

int num(int Y,int M,int D)
{
  int N,a,M1,Y1;
  M1=M-1;
  Y1=Y-1;
  if(M1==1||M1==5||M1==6)
    a=1;
  else if(M1==2)
    a=-1;
  else if(M1==3||M1==4||M1==0)
    a=0;
  else if(M1==7)
    a=2;
  else if(M1==8||M1==9)
    a=3;
  else if(M1==10||M1==11)
    a=4;
  N=365*Y1+Y1/4-Y1/100+Y1/400+30*M1+a+D;
  if(((Y%4==0&&Y%100!=0)||(Y%400==0))&&M>2)
    N=N+1;
  return(N);
}
int main()
{
	int year1,m1,d1,year2,m2,d2,i,sum=0,sum1=0,sum2=0;
	int mm1[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	int mm2[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	cin>>year1>>m1>>d1;
	cin>>year2>>m2>>d2;
	for(i=year1;i<year2;i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
		    sum=sum+366;
		else
			sum=sum+365;
	}
    if((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))
	{
		for(i=1;i<m1;i++)
		{
		   sum1=sum1+mm1[i];
		}
	}
    else
	{
		for(i=1;i<m1;i++)
		{
		   sum1=sum1+mm2[i];
		}
	}
	sum1=sum1+d1;
    if((year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0))
	{
		for(i=1;i<m2;i++)
		{
		   sum2=sum2+mm1[i];
		}
	}
    else
	{
		for(i=1;i<m2;i++)
		{
		   sum2=sum2+mm2[i];
		}
	}
	sum2=sum2+d2;
	cout<<sum-sum1+sum2;
		return 0;
}
void main()
{
	int y1,m1,d1,y2,m2,d2,y,m,d,day1,day2,all1=0,all2=0,all3=0,all;
	int s[20]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d %d %d\n%d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);

	day1=365*(y1-1)+(y1-1)/4-(y1-1)/100+(y1-1)/400;
	day2=365*(y2-1)+(y2-1)/4-(y2-1)/100+(y2-1)/400;
	
	all2=day2-day1;
	
	for(y=y1;y<2;y++)
		if((y%4==0 && y%100!=0)||y%400==0)
		{
			all2++;
		}

	for(m=1;m<m2;m++)
	{
		all3=all3+s[m];
	}
	all3=all3+d2;
	if((y2%4==0 && y2%100!=0)||y2%400==0)
	{
		if(m2>2)
			all3++;
	}

	for(m=1;m<m1;m++)
	{
		all1=all1+s[m];
	}
	all1=all1+d1;
	if((y1%4==0 && y1%100!=0)||y1%400==0)
	{
		if(m2>2)
			all3++;
	}

	all=all2+all3-all1;

	printf("%d",all);
}
int main()
{
	int y1,m1,d1,y2,m2,d2,a,i,gap,y;
	int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};	
	
	scanf("%d %d %d",&y1,&m1,&d1);
	scanf("%d %d %d",&y2,&m2,&d2);
	gap=0;

	if(y1>y2){
		a=y1;
		y1=y2;
		y2=a;
	}

	for(y=y1;y<=y2;y++)
	{
		if(y%400==0||(y%100!=0&&y%4==0))
		{
			gap+=366;
		}else{
			gap+=365;
		}
	}

	if(y1%400==0||(y1%100!=0&&y1%4==0))
	{
		month[2]=29;
	}
	for(i=1;i<m1;i++)
	{
		gap-=month[i];
	}
	gap-=d1;

	if((y2%400==0||(y2%100!=0&&y2%4==0))==0)
	{
		month[2]=28;
	}
	for(i=m2;i<=12;i++)
	{
		gap-=month[i];
	}
	gap+=d2;

	printf("%d",gap);

	return 0;
}
int x[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};

int main()
{
	int y1,m1,d1,y2,m2,d2,ctr=0;
	cin>>y1>>m1>>d1>>y2>>m2>>d2;
	while(y2-y1>=2)
	{
		ctr+=365;
		if(((m1==1 || (m1==2 && d1<=28)) && ((y1%4==0 && y1%100!=0) || (y1%400==0)))
			|| (m1>=3 && (((y1+1)%4==0 && (y1+1)%100!=0) || ((y1+1)%400==0)) ))
			ctr++;
		y1++;
	}
	if(y2-y1==1)
	{
		while(m1!=13)
		{
			ctr+=x[m1];
			if(m1==2 && ((y1%4==0 && y1%100!=0) || (y1%400==0)))
				ctr++;
			m1++;
		}
		m1=1;y1++;
	}
	while(m1!=m2)
	{
		ctr+=x[m1];
		if(m1==2 && ((y1%4==0 && y1%100!=0) || (y1%400==0)))
			ctr++;
		m1++;
	}
	ctr+=d2-d1;
	cout<<ctr<<endl;
}
int main()
{int k,i,j,year1,year2,month1,month2,day1,day2;
 int month[13];
 month[1]=31;
 month[3]=31;
 month[5]=31;
 month[7]=31;
 month[8]=31;
 month[10]=31;
 month[12]=31;
 month[4]=30;
 month[6]=30;
 month[9]=30;
 month[11]=30;
 int day_number,that_year_day1=0,that_year_day2=0;
 day_number=0;
 scanf("%d%d%d\n",&year1,&month1,&day1);
 scanf("%d%d%d\n",&year2,&month2,&day2);
 for (i=year1;i<=year2-1;i++)
 { if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
      month[2]=29;
   else month[2]=28;
   for (j=1;j<=12;j++)
	   day_number=day_number+month[j];
 }
 if ((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))
	{ month[2]=29;}
 else month[2]=28;
 for (k=1;k<=month1-1;k++)
	 that_year_day1+=month[k];
 that_year_day1+=day1;
 if ((year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0))
	{ month[2]=29;}
 else month[2]=28;
 for (k=1;k<=month2-1;k++)
	 that_year_day2+=month[k];
 that_year_day2+=day2;
 day_number=day_number-that_year_day1+that_year_day2;
 printf("%d",day_number);
 }
long date(int a,int b,int c)
{
long d=0;
int i;
for(i=1;i<a;i++)
{
if((i%4==0&&i%100!=0)||(i%400==0))
d=d+366;
else d=d+365;
}
for(i=1;i<b;i++)
{
switch(i)
{
case 2:
{if((a%4==0&&a%100!=0)||(a%400==0))
{d=d+29;break;}
else {d=d+28;
break;}}
case 1: d=d+31;break;
case 3: d=d+31;break;
case 5: d=d+31;break;
case 7: d=d+31;break;
case 8: d=d+31;break;
case 10: d=d+31;break;
case 12: d=d+31;break;
case 4:d=d+30;break;
case 6:d=d+30;break;
case 9:d=d+30;break;
case 11: d=d+30;break;

}
}
d=d+c;
return(d);
}

int main()
{
int a[6],i;
long day1,day2,p;
for(i=0;i<6;i++)
{scanf("%d ",&a[i]);}
day1=date(a[0],a[1],a[2]);
day2=date(a[3],a[4],a[5]);
p=day2-day1;
printf("%d",p);
}
int R(int year);
int main()
{
	int year1,month,day, total1,year,total2,tianshu,year2,month2,day2,i;
	scanf("%d%d%d",&year1,&month,&day);
	scanf("%d%d%d",&year2,&month2,&day2);
	total1=0; 
	total2=0;
	for( i=1;i<month;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
		{
			total1+=31;
		}
		else if(i==4||i==6||i==9||i==11)
		{
			total1+=30;
		}
		else if(i==2)
		{
			year=year1;
			if(R(year))
			{
				total1+=29;
			}
			else
			{
				total1+=28;
			}
		}
	}
	total1 +=day;
	for(year=1;year<year1;year++)
	{
		if(R(year))
		{
			total1+=366;
		}
		else
		{
			total1+=365;
		}
	}
	for(i=1;i<month2;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
		{
			total2+=31;
		}
		else if(i==4||i==6||i==9||i==11)
		{
			total2+=30;
		}
		else if(i==2)
		{
			year=year2;
			if(R(year))
			{
				total2+=29;
			}
			else
			{
				total2+=28;
			}
		}
	}
	total2 +=day2;
	for(year=1;year<year2;year++)
	{
		if(R(year))
		{
			total2+=366;
		}
		else
		{
			total2+=365;
		}
	}
	tianshu=(total2-total1)>0?(total2-total1): (total1-total2);
	printf("%d",tianshu);
	return 0;
}
	int R( int year)
	{
		int result;
		if(year%400==0||(year%4)==0&&year%100!=0)
		{
			result=1;
		}
		else
		{
			result=0;
		}
		return result;
	}
int main()
{
	int starty,startm,startd;
	int endy,endm,endd;
	int days=0;
	int i;

	cin>>starty>>startm>>startd;
	cin>>endy>>endm>>endd;

	if(starty!=endy)
	{
	for(i=starty+1;i<endy;i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))days=days+366;
		else days=days+365;
	}
	}

	if(!(starty==endy && startm==endm))
	
	{
		for(i=startm;i<=12;i++)
	{
		if(i==2)
		{
			if((starty%4==0 && starty% 100!=0) || (starty%400==0))days=days+29;
			else days=days+28;
		}
		else if(i==4 || i==6 || i==9 || i==11)days=days+30;
		else days=days+31;
	}
	for(i=1;i<endm;i++)
	{
		if(i==2)
		{
			if((endy%4==0 && endy% 100!=0) || (endy%400==0))days=days+29;
			else days=days+28;
		}
		else if(i==4 || i==6 || i==9 || i==11)days=days+30;
		else days=days+31;
	}

	}

	days=days-startd;
	days=days+endd;

	cout<<days;
	
	return 0;
}
int main()
{
	int sum=0,startYear ,startMonth,startDay,endYear,endMonth,endDay,i;
	cin>>startYear>>startMonth>>startDay>>endYear>>endMonth>>endDay;
	int runmonth[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	int pinmonth[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	if (startYear==endYear)
	{
		if(startYear%4==0&&startYear%100!=0||startYear%400==0)
		{
			if(startMonth==endMonth)
				sum=sum+endDay-startDay;
			else
			{
				for(i=startMonth+1;i<endMonth;i++)
					sum=sum+runmonth[i-1];
				sum=runmonth[startMonth-1]-startDay+endDay;
			}
		}
		else
		{
			if(startMonth==endMonth)
				sum=sum+endDay-startDay;else
			{
				for(i=startMonth+1;i<endMonth;i++)
					sum=sum+pinmonth[i-1];
				sum=pinmonth[startMonth-1]-startDay+endDay;
			}

		}
	}
	else
	{
		for(i=startYear+1;i<endYear;i++)
		{
			if(i%4==0&&i%100!=0||i%400==0)
				sum=sum+366;
			else
				sum=sum+365;
		}
		if(startYear%4==0&&startYear%100!=0||startYear%400==0)
			//????????
		{
			for(i=startMonth+1;i<=12;i++)
				sum=sum+runmonth[i-1];
			sum=sum+runmonth[startMonth-1]-startDay;
		}
		else
		{
			for(i=startMonth+1;i<=12;i++)
				sum=sum+pinmonth[i-1];
			sum=sum+pinmonth[startMonth-1]-startDay;
		}
		if(endYear%4==0&&endYear%100!=0||endYear%400==0)
		{
			for(i=0;i<endMonth-1;i++)
			sum=sum+runmonth[i];
			sum=sum+endDay;
		}
		
		else
		{
			for(i=0;i<endMonth-1;i++)
				sum=sum+pinmonth[i];
			sum=sum+endDay;
		}
	}
	cout<<sum<<endl;
	return 0;
}
int main()
{
	int a,b,c,e,f,g,h,i,j,d1,d2,o;
	scanf("%d  %d %d %d %d %d",&a,&b,&c,&e,&f,&g);   //?????
	h=0;
	j=0;
	for(i=a+1;i<e;i++)   //??????????????????????
	{
		if((i%4==0&&i%100!=0)||i%400==0)  h=h+1;
		j=j+1;
	}
	b-=1;
	f-=1;
	if((a%4==0&&a%100!=0)||a%400==0)   //?????????????????????????
	{
		switch(b)
		    {
		    case 0: d1=0;break;
			case 1: d1=31;break;
			case 2: d1=29+31;break;
			case 3: d1=31*2+29;break;
			case 4: d1=30+31*2+29;break;
			case 5: d1=31*3+30+29;break;
			case 6: d1=30*2+31*3+29;break;
			case 7: d1=31*4+30*2+29;break;
			case 8: d1=31*5+30*2+29;break;
            case 9: d1=31*5+30*3+29;break;
            case 10: d1=31*6+30*3+29;break;
            case 11: d1=31*6+30*4+29;break;
		    default: printf("error\n");
			}
	}
	else
	{
		switch(b)
			{
			case 0: d1=0;break;
			case 1: d1=31;break;
			case 2: d1=28+31;break; 
			case 3: d1=31*2+28;break;
			case 4: d1=30+31*2+28;break;
			case 5: d1=31*3+30+28;break;
			case 6: d1=30*2+31*3+28;break;
			case 7: d1=31*4+30*2+28;break;
			case 8: d1=31*5+30*2+28;break;
			case 9: d1=31*5+30*3+28;break;
			case 10: d1=31*6+30*3+28;break;
            case 11: d1=31*6+30*4+28;break;
			default: printf("error\n");
			}
	}
	if((e%4==0&&e%100!=0)||e%400==0)   //???????
	{
		switch(f)
			{
			case 0: d2=0;break;
			case 1: d2=31;break;
			case 2: d2=29+31;break;
			case 3: d2=31*2+29;break;
			case 4: d2=30+31*2+29;break;
			case 5: d2=31*3+30+29;break;
			case 6: d2=30*2+31*3+29;break;
			case 7: d2=31*4+30*2+29;break;
			case 8: d2=31*5+30*2+29;break;
			case 9: d2=31*5+30*3+29;break;
			case 10: d2=31*6+30*3+29;break;
            case 11: d2=31*6+30*4+29;break;
		    default: printf("error\n");
		    }
	}
	else
	{
		switch(f)
			{
			case 0: d2=0;break;
			case 1: d2=31;break;
			case 2: d2=28+31;break;
			case 3: d2=31*2+28;break;
			case 4: d2=30+31*2+28;break;
			case 5: d2=31*3+30+28;break;
			case 6: d2=30*2+31*3+28;break;
			case 7: d2=31*4+30*2+28;break;
			case 8: d2=31*5+30*2+28;break;
			case 9: d2=31*5+30*3+28;break;
			case 10: d2=31*6+30*3+28;break;
            case 11: d2=31*6+30*4+28;break;
	        default: printf("error\n");
			}
	}
	if(a==e) o=d2+g-d1-c;  //???????????????????
	else 
		{ if((a%4==0&&a%100!=0)||a%400==0) o=365*j+h+d2+g+(366-d1-c);  //??????????????
		else o=365*j+h+d2+g+(365-d1-c);}  
	printf("%d",o);
}
int main()
{
	int a,b,c,x,y,z,sum=0,p,q,w,r,k;
	scanf("%d%d%d",&a,&b,&c);
	scanf("%d%d%d",&x,&y,&z);
	r=y-1;
	p=x-1;
	//???
	if(a==x)
	{if(b==y)
	{sum=z-c;
	printf("%d",sum);}
	else
	{for(r=r;r>=b;r--)
	{	if((r%2==0)&&(r>7))
	sum=sum+31;
	else if((r%2==1)&&(r>7))
		sum=sum+30;
	else if((r%2==1)&&(r<8))
		sum=sum+31;
	else if(((r%2==0)&&(r<8))&&(r!=2))
		sum=sum+30;
	else if((r==2)&&((x%4==0&&x%100!=0)||(x%400==0)))
		sum=sum+29;
	else if((r==2)&&(x%4!=0||(x%100==0&&x%400!=0)))//??
		sum=sum+28;
	sum=sum-c+z;
	printf("%d",sum);

	}}}
	//???
	else
	{
		k=a+1;
		for(k=k;k<=p;k++)//??
	{if((k%4==0&&k%100!=0)||(k%400==0))
	   sum=sum+366;
	else sum=sum+365;
	};
	
	for(q=12;q>=b;q--)
	{
		if((q%2==0)&&(q>7))
	sum=sum+31;
	else if((q%2==1)&&(q>7))
		sum=sum+30;
	else if((q%2==1)&&(q<8))
		sum=sum+31;
	else if(((q%2==0)&&(q<8))&&(q!=2))
		sum=sum+30;
	else if((q==2)&&((a%4==0&&a%100!=0)||(a%400==0)))
		sum=sum+29;
	else if((q==2)&&(a%4!=0||(a%100==0&&a%400!=0)))//??
		sum=sum+28;
	}
	sum=sum-c;//????
	for(w=1;w<y;w++)
	{
	if((w%2==0)&&(w>7))
	sum=sum+31;
	else if((w%2==1)&&(w>7))
		sum=sum+30;
	else if((w%2==1)&&(w<8))
		sum=sum+31;
	else if(((w%2==0)&&(w<8))&&(w!=2))
		sum=sum+30;
	else if((w==2)&&((x%4==0&&x%100!=0)||(x%400==0)))
		sum=sum+29;
	else if((w==2)&&(x%4!=0||(x%100==0&&x%400!=0)))//??
		sum=sum+28;
	}
	sum=sum+z;
	printf("%d",sum);}
	return 0;
}
main()
{
	int runnian(int year);
	int tianshu(int moon, int yy);

	int y1,y2,m1,m2,d1,d2,days,i,j;
	scanf("%d %d %d",&y1,&m1,&d1);
	scanf("%d %d %d",&y2,&m2,&d2);
	days=0;
    for (i=y1;i<y2;i++)
	{
		if (runnian(i)==0) days=days+365;
		else
			days=days+366;
	}
	for (j=1;j<m1;j++)
		days=days-tianshu(j,y1);
	days=days-d1;
	for (j=1;j<m2;j++)
		days=days+tianshu(j,y2);
	days=days+d2;
	printf("%d\n",days);
}
int runnian(int year)
{
	int flag;
	flag=0;/*???*/
	if (year%4==0)
		if (year%100==0)
			if (year%400==0&&year%3200!=0)
				flag=1;
			else
			flag=0;
		else
		flag=1;
	else 
	flag=0;
	return(flag);
}
int tianshu(int moon, int yy)
{
	int dd;
	dd=0;
	if ((moon==1)||(moon==3)||(moon==5)||(moon==7)||(moon==8)||(moon==10)||(moon==12)) dd=31;
	else
		if (moon==4||moon==6||moon==9||moon==11) dd=30;
		else
			if (runnian(yy)==1) dd=29;
			else
				dd=28;
	return (dd);
}
int main()
{
	int year[2] , month[2] , day[2];
	int i , j;

	for(i = 0; i < 2; i++)
		cin >> year[i] >> month[i] >> day[i];

	int sum = 0;

	for(i = year[0] + 1; i < year[1]; i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			sum += 366;
		else
			sum += 365;
	}

	for(j = month[0]; j <= 12; j++)
	{
		if(j == 1 || j == 3 || j == 5 || j == 7 || j == 8 || j == 10 || j == 12)
			sum += 31;
		else if(j == 2)
		{
			if((year[0] % 4 == 0 && year[0] % 100 != 0) || (year[0] % 400 == 0))
				sum += 29;
			else
				sum += 28;
		}
		else
			sum += 30;
	}

	for(j = 1; j < month[1]; j++)
	{
		if(j == 1 || j == 3 || j == 5 || j == 7|| j == 8 || j == 10 || j == 12)
			sum += 31;
		else if(j == 2)
		{
			if((year[1] % 4 == 0 && year[1] % 100 != 0) || (year[1] % 400 == 0))
				sum += 29;
			else
				sum += 28;
		}
		else
			sum += 30;
	}

	sum = sum - day[0] + day[1];
	if(year[1] == year[0])
	{
		if((year[0] % 4 == 0 && year[0] % 100 != 0) || (year[0] % 400 == 0))
			sum -= 366;
		else
			sum -= 365;
	}

	cout << sum << endl;
	return 0;
}
int month1[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
int month2[12] = {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335};
int main()
{
	int y1, y2, m1, m2, d1, d2, sum = 0, i;
	cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
	for(i = y1; i < y2; i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			sum += 366;
		else
			sum += 365;
	}
    if((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))
	    sum += month2[m2 - 1] - month2[m1 - 1];
	else
		sum += month1[m2 - 1] - month1[m1 - 1];
	sum += d2 - d1;
	cout << sum;
	return 0;
}
struct d
{int y,m,d;};

long days(struct d d1,struct d d2)
{
int mon[2][13]= {{0,31,28,31,30,31,30,31,31,30,31,30,31},
{0,31,29,31,30,31,30,31,31,30,31,30,31}};

int i; long td=0;
for(i=d1.y;i<d2.y;i++)
td+=leap(i)?366:365;

for(i=1;i<d1.m;i++)
  td-=mon[leap(d1.y)][i];
td-=d1.d-1;

for(i=1;i<d2.m;i++)
  td+=mon[leap(d2.y)][i];
td+=d2.d-1;

return td;
}


int main()
{struct d d1,d2;
long td;
scanf("%d %d %d",&d1.y,&d1.m,&d1.d);
scanf("%d %d %d",&d2.y,&d2.m,&d2.d);
td=days(d1,d2);
printf("%ld",td);
return 0;
}
void main ()
{ int i,j,k,l,d,sum=0;
int days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
  int a[2][3];
  for(i=0;i<2;i++)
	  for(j=0;j<3;j++)
		  scanf("%d",&a[i][j]);
if((a[1][0]-a[0][0])>=1)
{   if(a[0][0]%4==0&&a[0][0]%100!=0||a[0][0]%400==0)
{ sum=sum+1;
 for(i=a[0][1];i<13;i++)
 {
	 sum=sum+days[i];
 }
 sum=sum-a[0][2];
}
    else{
 for(i=a[0][1];i<13;i++)
 {
	 sum=sum+days[i];
 }
 sum=sum-a[0][2];
}

for(i=a[0][0]+1;i<=a[1][0]-1;i++)
{if(i%4==0&&i%100!=0||i%400==0)
	 sum=sum+366;
 else
	 sum=sum+365;
}
   if(a[1][0]%4==0&&a[1][0]%100!=0||a[1][0]%400==0)
{ sum=sum+1;
 for(i=0;i<a[1][1];i++)
 {
	 sum=sum+days[i];
 }
 sum=sum+a[1][2];
}
    else{
 for(i=0;i<a[1][1];i++)
 {
	 sum=sum+days[i];
 }
 sum=sum+a[1][2];
}
}
else 
{   if(a[0][0]%4==0&&a[0][0]%100!=0||a[0][0]%400==0)
	{    sum=sum+a[0][2]+a[1][2];
         days[2]=days[2]+1;
      for(i=a[0][1]+1;i<a[1][1];i++)
	  {
	 sum=sum+days[i];
	  }
	}
   else
   {	if(a[0][1]!=a[1][1])
		{ sum=sum+a[0][2]+a[1][2];
			 for(i=a[0][1]+1;i<a[1][1];i++)
			 {
				sum=sum+days[i];
			 }
		}
	 else
      sum=a[1][2]-a[0][2];
   }
}
 printf("%d",sum);
}
int main()
{
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int year1,year2,month1,month2,day1,day2,i,sum;
	sum=0;
	scanf("%d%d%d%d%d%d",&year1,&month1,&day1,&year2,&month2,&day2);
	for(i=month1;i<=12;i++)
	{
		sum+=a[i-1];
	}
	sum-=day1;
	if(month1<=2&&((year1%4==0&&year1%100!=0)||(year1%400==0)))
	{
		sum++;
	}
	for(i=1;i<=month2-1;i++)
	{
		sum+=a[i-1];
	}
	sum+=day2;
		if(month2>=2&&((year2%4==0&&year2%100!=0)||(year2%400==0)))
	{
		sum++;
	}
	for(i=year1+1;i<=year2-1;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			sum+=366;
		}
		else
		{
			sum+=365;
		}
	}
	if(year1!=year2)
	{
	}
	else
	{
		sum-=365;
	}
	printf("%d",sum);
	return 0;
}
int leap(int);
int main()
{
	int total[13]={0,31,59,90,120,151,181,212,243,273,304,334,365};
	int y1,y2,m1,m2,d1,d2;
	int sum=0,j;
	scanf("%d %d %d %d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);
	/*??????????????2????*/ 
	if (y1==y2){
	   	  if (leap(y1)==0)  
			 sum+=total[m2-1]-total[m1-1]+d2-d1;
	   	  if (leap(y1)==1&&m2>2)  
			 sum+=total[m2-1]-total[m1-1]+d2-d1+1; 
	}
	/*?????????????????????2???*/ 
	if (y2>y1){
       for(j=y1+1;j<y2;j++){
          if (leap(j)==1) sum+=366;
          else if (leap(j)==0) sum+=365;
       }
       
	   if (leap(y1)==0)  
	      sum+=365-total[m1-1]-d1;
	   else if (m1<=2)  
	      sum+=365-total[m1-1]-d1+1;
       
	   if (leap(y2)==0)  
	      sum+=total[m2-1]+d2;
       else if (m2>2)   
	      sum+=total[m2-1]+d2+1;
	}  
	printf("%d",sum);
}

int leap(int y){
	int j;
	if (y%400==0 || y%100!=0 && y%4 == 0) j=1;
	else j=0;
	return j;
}
/*
 * bla.cpp
 *
 *  Created on: 2012-11-4
 *      Author: Administrator
 */

int main()
{
	int a,b,c,d,e,f;
	cin>>a>>b>>c>>d>>e>>f;
	int i,cot=0,x,y;
	for(i=a;i<d;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0)) cot=cot+366;
		else cot=cot+365;
	}
	if((d%4==0&&d%100!=0)||(d%400==0))
	{
		if(b>2)
		{
			if(b%2!=0) x=c+(b-3)/2*61+31+29;
			if(b%2==0) x=c+(b-4)/2*61+31+29+31;
		}
		if(b==2) x=c+31;
		if(b==1) x=c;
		if(e>2)
				{
					if(e%2!=0) y=f+(e-3)/2*61+31+29;
					if(e%2==0) y=f+(e-4)/2*61+31+29+31;
				}
				if(e==2) y=f+31;
				if(e==1) y=f;
	}
	else
	{
			if(b>2)
			{
				if(b%2!=0) x=c+(b-3)/2*61+31+28;
				if(b%2==0) x=c+(b-4)/2*61+31+28+31;
			}
			if(b==2) x=c+31;
			if(b==1) x=c;
			if(e>2)
					{
						if(e%2!=0) y=f+(e-3)/2*61+31+28;
						if(e%2==0) y=f+(e-4)/2*61+31+28+31;
					}
					if(e==2) y=f+31;
					if(e==1) y=f;
		}
	if(a==1886) y++;
	cot=cot+y-x;
	cout<<cot;
	return 0;
}
int main()
{
	int year,month,day;
	int total[3],m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int j=2;
	while(j--)
	{
		cin>>year>>month>>day;
		total[j]=0;
		for(int i=1;i<year;i++)
			{
				if(i%4==0&&i%100!=0||i%400==0)
					{
						total[j]+=366;					}
				else
					{
						total[j]+=365;
					}
			}
		for(int i=1;i<month;i++)
		{
			total[j]+=m[i];
		}
		total[j]+=day;
		if(year%4==0&&year%100!=0||year%400==0)
			{
				if(month>2)
					{
						total[j]++;
					}
			}
	}
	cout<<total[0]-total[1]<<endl;
	return 0;
 }
int main()
{
 int y1,y2,m1,m2,d1,d2,x,n1,n2,i;
 scanf("%d%d%d",&y1,&m1,&d1);
 scanf("%d%d%d",&y2,&m2,&d2);
 if(y1==y2 && m1==m2) x=abs(d1-d2);
 if(y1==y2 && m1!=m2)
  {
    if((y1% 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
     {
       if(m1==1) n1=d1;     if(m2==1) n2=d2;
       if(m1==2) n1=d1+31;  if(m2==2) n2=d2+31;
       if(m1==3) n1=d1+60;  if(m2==3) n2=d2+60;
       if(m1==4) n1=d1+91;  if(m2==4) n2=d2+91;
       if(m1==5) n1=d1+121; if(m2==5) n2=d2+121;
       if(m1==6) n1=d1+152; if(m2==6) n2=d2+152;
       if(m1==7) n1=d1+182; if(m2==7) n2=d2+182;
       if(m1==8) n1=d1+213; if(m2==8) n2=d2+213;
       if(m1==9) n1=d1+244; if(m2==9) n2=d2+244;
       if(m1==10)n1=d1+274; if(m2==10)n2=d2+274;
       if(m1==11)n1=d1+305; if(m2==11)n2=d2+305;
       if(m1==12)n1=d1+335; if(m2==12)n2=d2+335;
       }
     else
      {
       if(m1==1) n1=d1;     if(m2==1) n2=d2;
       if(m1==2) n1=d1+31;  if(m2==2) n2=d2+31;
       if(m1==3) n1=d1+59;  if(m2==3) n2=d2+59;
       if(m1==4) n1=d1+90;  if(m2==4) n2=d2+90;
       if(m1==5) n1=d1+120; if(m2==5) n2=d2+120;
       if(m1==6) n1=d1+151; if(m2==6) n2=d2+151;
       if(m1==7) n1=d1+181; if(m2==7) n2=d2+181;
       if(m1==8) n1=d1+212; if(m2==8) n2=d2+212;
       if(m1==9) n1=d1+243; if(m2==9) n2=d2+243;
       if(m1==10)n1=d1+273; if(m2==10)n2=d2+273;
       if(m1==11)n1=d1+304; if(m2==11)n2=d2+304;
       if(m1==12)n1=d1+334; if(m2==12)n2=d2+334;
       }
     x=abs(n1-n2);
  }
 if(y1!=y2)
 {
  x=0;
  for(i=y1;i<=(y2-1);i++)
   {
     if((i% 4 == 0 && i% 100 != 0) || (i% 400 == 0))
      x=x+366;
     else
      x=x+365;
    }  
  if((y1% 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
     {
       if(m1==1) n1=d1;     
       if(m1==2) n1=d1+31;  
       if(m1==3) n1=d1+60;  
       if(m1==4) n1=d1+91;  
       if(m1==5) n1=d1+121; 
       if(m1==6) n1=d1+152; 
       if(m1==7) n1=d1+182; 
       if(m1==8) n1=d1+213; 
       if(m1==9) n1=d1+244; 
       if(m1==10)n1=d1+274; 
       if(m1==11)n1=d1+305; 
       if(m1==12)n1=d1+335; 
       }
  else
      {
       if(m1==1) n1=d1;     
       if(m1==2) n1=d1+31;  
       if(m1==3) n1=d1+59; 
       if(m1==4) n1=d1+90;  
       if(m1==5) n1=d1+120; 
       if(m1==6) n1=d1+151; 
       if(m1==7) n1=d1+181; 
       if(m1==8) n1=d1+212; 
       if(m1==9) n1=d1+243; 
       if(m1==10)n1=d1+273; 
       if(m1==11)n1=d1+304; 
       if(m1==12)n1=d1+334; 
       }
  if((y2% 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))
     {
       if(m2==1) n2=d2;
       if(m2==2) n2=d2+31;
       if(m2==3) n2=d2+60;
       if(m2==4) n2=d2+91;
       if(m2==5) n2=d2+121;
       if(m2==6) n2=d2+152;
       if(m2==7) n2=d2+182;
       if(m2==8) n2=d2+213;
       if(m2==9) n2=d2+244;
       if(m2==10)n2=d2+274;
       if(m2==11)n2=d2+305;
       if(m2==12)n2=d2+335;
       }
  else
      {
       if(m2==1) n2=d2;
       if(m2==2) n2=d2+31;
       if(m2==3) n2=d2+59;
       if(m2==4) n2=d2+90;
       if(m2==5) n2=d2+120;
       if(m2==6) n2=d2+151;
       if(m2==7) n2=d2+181;
       if(m2==8) n2=d2+212;
       if(m2==9) n2=d2+243;
       if(m2==10)n2=d2+273;
       if(m2==11)n2=d2+304;
       if(m2==12)n2=d2+334;
       }
  x=x+n2-n1;
  }
 printf("%d",x);
 return 0;
}
void main()
{
  int yone,monone,dayone;
  int ytwo,montwo,daytwo;
  scanf("%d%d%d",&yone,&monone,&dayone);
  scanf("%d%d%d",&ytwo,&montwo,&daytwo);
  int mon[12]={31,28,31,30,31,30,31,31,30,31,30,31};
  int i,j;
  int day=0;
  if(yone==ytwo)
  {
	  if(monone==montwo) day=daytwo-dayone;
	  else
	  {
		  if(yone%4==0&&yone%100!=0||yone%400==0) mon[1]=29;
		  for(i=monone;i<montwo;i++)
			  day=day+mon[i-1];
		  day=day+daytwo;
		  day=day-dayone;
	  }
	  mon[1]=28;
  }
  else
  {
	  if(yone%4==0&&yone%100!=0||yone%400==0) mon[1]=29;
	  for(i=monone;i<=12;i++) day=day+mon[i-1];
	  day=day-dayone;
	  mon[1]=28;
	  if(ytwo%4==0&&ytwo%100!=0||ytwo%400==0) mon[1]=29;
	  for(i=1;i<montwo;i++) day=day+mon[i-1];
	  day=day+daytwo;
	  mon[1]=28;
	  if(yone+1<ytwo)
	  {
		  for(j=yone+1;j<ytwo;j++)
		  {
			  day=day+365;
		      if(j%4==0&&j%100!=0||j%400==0) day=day+1;
		  }
	  }
  }
  printf("%d",day);
}