semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int y1,m1,d1,y2,m2,d2,r,s,s1,s2,i;
	scanf("%d%d%d\n",&y1,&m1,&d1);
	scanf("%d%d%d",&y2,&m2,&d2);
    if(y1>y2)
	{
		r=y1;y1=y2;y2=r;r=m1;m1=m2;m2=r;r=d1;d1=d2;d2=r;
	}
	if(y1==y2)
	{
		if((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
		{
			if(m1==1)s1=d1;
			else if(m1==2)s1=d1+31;
			else if(m1==3)s1=d1+60;
			else if(m1==4)s1=d1+91;
			else if(m1==5)s1=d1+121;
			else if(m1==6)s1=d1+152;
			else if(m1==7)s1=d1+182;
			else if(m1==8)s1=d1+213;
			else if(m1==9)s1=d1+244;
			else if(m1==10)s1=d1+274;
			else if(m1==11)s1=d1+305;
			else if(m1==12)s1=d1+335;
            if(m2==1)s2=d2;
			else if(m2==2)s2=d2+31;
			else if(m2==3)s2=d2+60;
			else if(m2==4)s2=d2+91;
			else if(m2==5)s2=d2+121;
			else if(m2==6)s2=d2+152;
			else if(m2==7)s2=d2+182;
			else if(m2==8)s2=d2+213;
			else if(m2==9)s2=d2+244;
			else if(m2==10)s2=d2+274;
			else if(m2==11)s2=d2+305;
			else if(m2==12)s2=d2+335;
			s=s2-s1;
		}
		else
		{
			if(m1==1)s1=d1;
			if(m1==2)s1=d1+31;
			if(m1==3)s1=d1+59;
			if(m1==4)s1=d1+90;
			if(m1==5)s1=d1+120;
			if(m1==6)s1=d1+151;
		    if(m1==7)s1=d1+181;
			if(m1==8)s1=d1+212;
			if(m1==9)s1=d1+243;
			if(m1==10)s1=d1+273;
			if(m1==11)s1=d1+304;
			if(m1==12)s1=d1+334;
            if(m2==1)s2=d2;
			if(m2==2)s2=d2+31;
			if(m2==3)s2=d2+59;
			if(m2==4)s2=d2+90;
			if(m2==5)s2=d2+120;
			if(m2==6)s2=d2+151;
			if(m2==7)s2=d2+181;
			if(m2==8)s2=d2+212;
		    if(m2==9)s2=d2+243;
			if(m2==10)s2=d2+273;
			if(m2==11)s2=d2+304;
			if(m2==12)s2=d2+334;
			s=s2-s1;
		}
		printf("%d",s);
	}
	if(y1<y2)
	{
		s=0;
		for(i=y1;i<=y2;i++)
		{
			if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))s=s+366;
			else s=s+365;
		}
		if((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
		{
			if(m1==1)s1=d1;
			if(m1==2)s1=d1+31;
			if(m1==3)s1=d1+60;
			if(m1==4)s1=d1+91;
			if(m1==5)s1=d1+121;
			if(m1==6)s1=d1+152;
			if(m1==7)s1=d1+182;
			if(m1==8)s1=d1+213;
			if(m1==9)s1=d1+244;
			if(m1==10)s1=d1+274;
			if(m1==11)s1=d1+305;
			if(m1==12)s1=d1+335;
		}
		else
		{
			if(m1==1)s1=d1;
			if(m1==2)s1=d1+31;
			if(m1==3)s1=d1+59;
			if(m1==4)s1=d1+90;
			if(m1==5)s1=d1+120;
			if(m1==6)s1=d1+151;
			if(m1==7)s1=d1+181;
			if(m1==8)s1=d1+212;
			if(m1==9)s1=d1+243;
			if(m1==10)s1=d1+273;
			if(m1==11)s1=d1+304;
			if(m1==12)s1=d1+334;
		}
		if((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))
		{
			if(m2==1)s2=d2;
			if(m2==2)s2=d2+31;
			if(m2==3)s2=d2+60;
			if(m2==4)s2=d2+91;
			if(m2==5)s2=d2+121;
			if(m2==6)s2=d2+152;
			if(m2==7)s2=d2+182;
			if(m2==8)s2=d2+213;
			if(m2==9)s2=d2+244;
			if(m2==10)s2=d2+274;
			if(m2==11)s2=d2+305;
			if(m2==12)s2=d2+335;
			s2=366-s2;
		}
		else
		{
		    if(m2==1)s2=d2;
			if(m2==2)s2=d2+31;
			if(m2==3)s2=d2+59;
			if(m2==4)s2=d2+90;
			if(m2==5)s2=d2+120;
			if(m2==6)s2=d2+151;
			if(m2==7)s2=d2+181;
			if(m2==8)s2=d2+212;
			if(m2==9)s2=d2+243;
			if(m2==10)s2=d2+273;
			if(m2==11)s2=d2+304;
			if(m2==12)s2=d2+334;
			s2=365-s2;
		}
		s=(s-s1-s2);
		printf("%d\n",s);
	}
}
void main()
{
long q,w,e,a,s,d,i,x,sum1,sum2=0,sum3=0,sum,t1,t2=0,t3,d1,d2,sum4=0,sum5,sumA,sumB;
d1=0,d2=0;
scanf("%d %d %d\n %d %d %d",&q,&w,&e,&a,&s,&d);
int m[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int n[12]={31,29,31,30,31,30,31,31,30,31,30,31};
sum1=0;
if(q==1886)
d=d+1;

{if((q% 4 == 0 && q % 100 != 0)|| (q% 400 == 0))
 { t1=1;
   while(t1<w)
    {sum1=sum1+n[t1];
     t1=t1+1;}
}
else
    t1=1;
    while(t1<w)
    {sum1=sum1+m[t1];
     t1=t1+1;}
sum1=sum1+e;
}

d1=0,i=1;
while(i<q) 
{ 
if(((i % 4 == 0) && (i % 100 != 0))|| (i% 400 == 0))
d1=d1+1,i=i+1;
else
i=i+1;
}

sum2=d1+(q-1)*365;
sumA=sum1+sum2;

{if((a% 4 == 0 && a  % 100 != 0)|| (a% 400 == 0))
 { t2=1;
   while(t2<s)
    {sum3=sum3+n[t2];
     t2=t2+1;}
}
else
    t2=1;
    while(t2<s)
    {sum3=sum3+m[t2];
     t2=t2+1;}
sum3=sum3+d;
}

d2=0,x=1;
while(x<a) 
{ 
if(((x % 4 == 0) && (x % 100 != 0))|| (x% 400 == 0))
d2=d2+1,x=x+1;
else
x=x+1;
}

sum4=d2+(a-1)*365;
sumB=sum3+sum4;

printf("%d",sumB-sumA);
}
int main(int argc, char* argv[])
{
	const int month1[14]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	const int month2[14]={0,31,29,31,30,31,30,31,31,30,31,30,31};

	int startYear,startMonth,startDay;
	int endYear,endMonth,endDay;
	int i,k,days;
	int flag;

	scanf("%d%d%d",&startYear,&startMonth,&startDay);
	scanf("%d%d%d",&endYear,&endMonth,&endDay);

	days=0;
//????????
	if(startYear==endYear){
		//??
		if ((startYear%4==0&&startYear%100!=0)||(startYear%400==0)){
			//????????
			if(startMonth==endMonth)
				days=endDay-startDay;
			//?????????
			else{
				for(k=startMonth;k<endMonth;k++)
					days+=month2[k];
				days+=endDay-startDay;
			}
		}
		//??
		else{
			if(startMonth==endMonth)
				days=endDay-startDay;
			else{
				for(k=startMonth;k<endMonth;k++)
					days+=month1[k];
				days+=endDay-startDay;
			}
		}
		printf("%d",days);
		return 0;
	}
//?????????
	for(i=startYear; i<=endYear; i++){
		if ((i%4==0&&i%100!=0)||(i%400==0))
			flag=1;
		else
			flag=0;
		//???
		if(i==startYear){
			if(flag==1)
				for(k=startMonth;k<=12;k++)
					days+=month2[k];
			else
				for(k=startMonth;k<=12;k++)
					days+=month1[k];
			days-=startDay;
		}
		//???
		else if(i==endYear){
			if(flag==1)
				for(k=1;k<endMonth;k++)
					days+=month2[k];
			else
				for(k=1;k<endMonth;k++)
					days+=month1[k];
			days+=endDay;
		}
		//?????+365 ? +366
		else{
			if(flag==1)
				for(k=1;k<=12;k++)
					days+=month2[k];
			else
				for(k=1;k<=12;k++)
					days+=month1[k];
		}
	}
	printf("%d",days);
	return 0;
}
int main ()
{
	int startyear,startmonth,startday,endyear,endmonth,endday,year,month,m,s=0;
	scanf("%d%d%d%d%d%d",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);
	if (startyear!=endyear)
	{
	for (year=startyear+1;year<endyear;year++)
	{
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
			s=s+366;
		else s=s+365;
	}
	for (month=1;month<endmonth;month++)
	{
		if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
			s=s+31;
		else if (month==4||month==6||month==9||month==11)
			s=s+30;
		else {
			        if ((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))
						s=s+29;
					else s=s+28;
		     }
	}
	s=s+endday-1;
	m=0;
	for (month=1;month<startmonth;month++)
	{
		if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
			m=m+31;
		else if (month==4||month==6||month==9||month==11)
			m=m+30;
		else {
			        if ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
						m=m+29;
					else m=m+28;
		     }
	}
         m=m+startday-1;   
	if ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
		   s=s+366-m;
	   else
		   s=s+365-m;
	}
	else
		{
			if (startmonth!=endmonth)
			{
				for (month=startmonth+1;month<endmonth;month++)
				{
					if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
			s=s+31;
		else if (month==4||month==6||month==9||month==11)
			s=s+30;
		else {
			        if ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
						s=s+29;
					else s=s+28;
		     }
				}
				s=s+endday-1;
				if(startmonth==1||startmonth==3||startmonth==5||startmonth==7||startmonth==8||startmonth==10||startmonth==12)
			s=s+31-startday;
		else if (startmonth==4||startmonth==6||startmonth==9||startmonth==11)
			s=s+30-startday;
		else {
			        if ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
						s=s+29-startday;
					else s=s+28-startday;
		     }
			}
			else s=endday-startday;
	     }
	   	   printf("%d",s);
	   return 0;
}
int main()
{int sy,sm,sd,ey,em,ed,i,sum1=0,sum2=0,Sum=0;
 int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
 int b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
 cin>>sy>>sm>>sd;
 cin>>ey>>em>>ed;
     if((sy%100!=0&&sy%4==0)||(sy%400==0))
	 {for(i=sm;i<=12;i++) {sum1=sum1+b[i];}
       sum1=sum1-sd;
	 }
     else
	 {for(i=sm;i<=12;i++) {sum1=sum1+a[i];}
      sum1=sum1-sd;
	 }
	 if((ey%100!=0&&ey%4==0)||(ey%400==0))
	 {for(i=em;i<=12;i++) {sum2=sum2+b[i];}
       sum2=sum2-ed;
	 }
     else
	 {for(i=em;i<=12;i++) {sum2=sum2+a[i];}
      sum2=sum2-ed;
	 }
  
	 if(sy==ey) Sum=sum1-sum2;
	else
	 {
		 for(i=sy+1;i<=ey;i++)
		 {if((i%100!=0&&i%4==0)||(i%400==0)) Sum=Sum+366;
		 else Sum=Sum+365;
		 }
           Sum=Sum+sum1-sum2;
	  }
     
  
 
  cout<<Sum;

 return 0;
}
void wc(int a1,int b1,int c1,int a2,int b2,int c2,int sum)
{
	if(a1==a2&&b1==b2&&c1==c2){cout<<sum;}
	else
	{
	    if((b1==1||b1==3||b1==5||b1==7||b1==8||b1==10)&&c1==31){wc(a1,b1+1,1,a2,b2,c2,sum+1);}
	    else if(b1==12&&c1==31){wc(a1+1,1,1,a2,b2,c2,sum+1);}
	    else if((b1==4||b1==6||b1==9||b1==11)&&c1==30){wc(a1,b1+1,1,a2,b2,c2,sum+1);}
	    else if(((a1%4==0&&a1%100!=0)||(a1%400==0))&&b1==2&&c1==29){wc(a1,b1+1,1,a2,b2,c2,sum+1);}
	    else if((!((a1% 4 == 0 && a1 % 100 != 0) || (a1% 400 == 0)))&&b1==2&&c1==28){wc(a1,b1+1,1,a2,b2,c2,sum+1);}
	    else {wc(a1,b1,c1+1,a2,b2,c2,sum+1);}
	}
}
int main()
{
	int a1=0,b1=0,c1=0,a2=0,b2=0,c2=0;
	cin>>a1>>b1>>c1;
	cin>>a2>>b2>>c2;
	wc(a1,b1,c1,a2,b2,c2,0);
	return 0;
}
int md[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int runnian(int year)
{
    if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
        return 1;
    else
        return 0;
}
int tian(int y, int m, int d)
{
    int x=0;
    for (int i=0;i<m-1;i++)
    {
        x += md[i];
    }
    x += d;
    if (runnian(y)&&(m>2||(m==2 && d==29)))
        x++;
    return x;
}
int main()
{
    int y1, y2, m1, m2, d1, d2;
    long dif=0;
    cin>>y1>>m1>>d1>>y2>>m2>>d2;
    while (y2-y1>=1)
    {
        dif += 365+runnian(y1);
        y1++;
    }
    dif=dif+(tian(y2,m2,d2)-tian(y1,m1,d1));
    cout<<dif<<endl;
    return 0;
}
int sum(int,int,int);
int m1[13]={0,31,30,31,30,31,30,31,31,30,31,30,31};
int m2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main()
{
   int y1, m1, d1, y2, m2, d2,count;
   cin >> y1 >> m1 >> d1;
   cin>> y2 >> m2 >>d2;
    count=sum(y2,m2,d2)-sum(y1,m1,d1);
	cout << count <<endl;
	return 0;
}
int sum(int year, int month,int day)
{
	int i,daysum=0,flag=0;
	for(i=1;i<year;i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0)) 
			daysum = daysum+366;
		else daysum=daysum+365;
	}
	if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		flag= 1;
	for(i=1;i<month;i++)
	{
		if(flag==0) daysum = daysum + m1[i];
		else daysum = daysum + m2[i];
	}
	daysum = daysum+day;
	return daysum;

}
int main()
{
	int days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int Days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int y1,y2,m1,m2,d1=0,d2=0,e,f,i,s=0,g,h;
	scanf("%d%d%d",&y1,&m1,&d1);
	scanf("%d%d%d",&y2,&m2,&d2);
	g=y1,h=y2;

	if((y1%4==0)&&(y1%100!=0)||(y1%400==0))
	{days[2]++;}
    if((y2%4==0)&&(y2%100!=0)||(y2%400==0))
	{Days[2]++;}
	e=d1;
	for(i=1;i<m1;i++)
		e=e+days[i];
	f=d2;
	for(i=1;i<m2;i++)
		f=f+Days[i];
	if(y2-y1>=2)
	{while(h-g>1)
	{
		g++;
     if((g%4==0)&&(g%100!=0)||(g%400==0))
	 { s=s+366;}
	 else{ s=s+365;}
	}
	s=s+f;
   if((y1%4==0)&&(y1%100!=0)||(y1%400==0))
   { s=s+366-e;}
   else{ s=s+365-e;}}
	else if (y2==y1)
	{s=f-e;}
	else if(y2-y1==1)
	{
      if((y1%4==0)&&(y1%100!=0)||(y1%400==0))
	  {s=f+366-e;}
	  else {s=f+365-e;}
	}
   printf("%d",s);
   return 0;
   }
main()
{
      int y1,y2,m1,m2,d1,d2,i,j,k,day[12]={31,28,31,30,31,30,31,31,30,31,30,31},s1,s2,r;
      scanf("%d %d %d",&y1,&m1,&d1);
      scanf("%d %d %d",&y2,&m2,&d2);
      r=(y2-y1)/4-(y2-y1)/100+(y2-y1)/400;
      s1=365*(y2-y1)+r;
      if(m2>m1 || (m2==m1 && d2>=d1))
      {
               for(i=m1-1;i<m2-1;i++)
               {
                                   s1=s1+day[i];
               }
               s1=s1-d1+d2;
               if(((y1%4==0 && y1%100!=0)||y1%400==0)&& m1<=2)s1++;
               if((y2%4==0 && y2%100!=0)||y2%400==0)
               {
                           if(m2>2)
                            s1++;
               }
      }
      else
      {
               for(i=m2-1;i<=m1-1;i++)
               {
                                   s1=s1-day[i];
               }
               s1=s1+d1-d2-1;
               if(((y1%4==0 && y1%100!=0)||y1%400==0)&& m1<=2)s1++;
               if((y2%4==0 && y2%100!=0)||y2%400==0)
               {
                           if(m2>2)
                            s1++;
               }
      }
      printf("%d",s1);
}
int main(){
	int y1,y2,m1,m2,d1,d2,n1=0,n2=0,n3=0,i,j;
	int mouth1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//??
	int mouth2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	int *p=mouth1;//????
	int *q=mouth2;
	*p=0;*(p+1)=31;*(p+2)=28;*(p+3)=31;*(p+4)=30;*(p+5)=31;*(p+6)=30;*(p+7)=31;*(p+8)=31;*(p+9)=30;*(p+10)=31;*(p+11)=30;*(p+12)=31;
	*q=0;*(q+1)=31;*(q+2)=29;*(q+3)=31;*(q+4)=30;*(q+5)=31;*(q+6)=30;*(q+7)=31;*(q+8)=31;*(q+9)=30;*(q+10)=31;*(q+11)=30;*(q+12)=31;//??
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
	for(i=y1;i<y2;i++){
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))n1+=366;
		else n1+=365;//???
	}
	if((y2% 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))
		for(j=0;j<m2;j++)
			n2+=*(q+j);
	else
		for(j=0;j<m2;j++)
			n2+=*(p+j);
	if((y1% 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
			for(j=0;j<m1;j++)
				n2-=*(q+j);
		else
			for(j=0;j<m1;j++)
				n2-=*(p+j);//????????
	n3=d2-d1;//???
	int sum=n1+n2+n3;//??
	cout<<sum<<endl;//??
	return 0;
}
int main()
{
	int leapyearjudgement(int YEAR);
	int daycounting(int month,int date,int LEAPYEAR);
	int sy,sm,sd,ey,em,ed;
	scanf("%d %d %d\n%d %d %d",&sy,&sm,&sd,&ey,&em,&ed);
	int year,countleapyear;
    countleapyear=0;
	for (year=sy;year<ey;year++)
		if ((year%4==0&&year%100!=0)||year%400==0) countleapyear++;
	int d1,d2;//d1???????????,??????????????2??????????
	d1=(ey-sy)*365+countleapyear;
	
	int daystart,dayend,leapyearstart,leapyearend;
	leapyearstart=leapyearjudgement(sy);
	daystart=daycounting(sm,sd,leapyearstart);
	leapyearend=leapyearjudgement(ey);
	dayend=daycounting(em,ed,leapyearend);
	
	d2=dayend-daystart;
	
	int DAY;
	DAY=d1+d2;
	printf("%d",DAY);
    return 0;
}

int leapyearjudgement(int YEAR)//?????
{
	int judge;//??????????1???0
	judge=0;
	if ((YEAR%4==0&&YEAR%100!=0)||YEAR%400==0) judge=1;
	return (judge);
}

int daycounting(int month,int date,int LEAPYEAR)//?????
{   int day;
	if (LEAPYEAR=1)
	{switch (month)
	{
	  case 1:day=date;break;
	  case 2:day=31+date;break;
	  case 3:day=60+date;break;
	  case 4:day=91+date;break;
	  case 5:day=121+date;break;
	  case 6:day=152+date;break;
	  case 7:day=182+date;break;
	  case 8:day=213+date;break;
	  case 9:day=244+date;break;
	  case 10:day=274+date;break;
	  case 11:day=305+date;break;
	  case 12:day=335+date;
	}
	}
	else 
	{switch (month)
	{
	  case 1:day=date;break;
	  case 2:day=31+date;break;
	  case 3:day=60-1+date;break;
	  case 4:day=91-1+date;break;
	  case 5:day=121-1+date;break;
	  case 6:day=152-1+date;break;
	  case 7:day=182-1+date;break;
	  case 8:day=213-1+date;break;
	  case 9:day=244-1+date;break;
	  case 10:day=274-1+date;break;
	  case 11:day=305-1+date;break;
	  case 12:day=335-1+date;
	}
	}
	return (day);
}
int Month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int leapyear(int year)
{
    if(((year%4==0)&&(year%100!=0))||(year%400==0))
        return 366;
    else
        return 365;
}
int Days(int startyear,int month,int day)
{
    int days=0,j;
    for(j=0;j<month;j++)
       days+=Month[j];
    days+=day;
    if((leapyear(startyear)==366)&&(month>2))
        return days+1;
    else
        return days;
}
int main()
{

    int StartY,StartM,StartD,EndY,EndM,EndD,sum=0,i;
    cin>>StartY>>StartM>>StartD;
    cin>>EndY>>EndM>>EndD;
    if(StartY==EndY)
	    cout<<Days(EndY,EndM,EndD)-Days(StartY,StartM,StartD);
    else
    {
	    for(i=StartY;i<EndY;i++)
	        sum+=leapyear(i);
	    sum+=Days(EndY,EndM,EndD)-Days(StartY,StartM,StartD);
	    cout<<sum<<endl;
    }
    return 0;
}
int main()
{
	int a,b,c,d,e,f,m,n;
	int num=0;
	int i,o,p;
	scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
	for(i=a+1;i<d;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			num=num+1;
		}
	}
	if(((a%4==0&&a%100!=0)||(a%400==0))&&b<=2)
	{
			num=num+1;
	}
	if(((d%4==0&&d%100!=0)||(d%400==0))&&e>=3)
	{
			num=num+1;
	}

    m=d-a;
	n=365*m+num;
	switch (b)
	{
		case 1:
			o=c;
			break;
		case 2:
		    o=31+c;
		    break;
		case 3:
			o=59+c;
			break;
		case 4:
			o=90+c;
			break;
		case 5:
			o=120+c;
			break;
		case 6:
			o=151+c;
			break;
		case 7:
			o=181+c;
			break;
		case 8:
			o=212+c;
			break;
		case 9:
			o=243+c;
			break;
		case 10:
			o=273+c;
			break;
		case 11:
			o=304+c;
			break;
		case 12:
			o=334+c;
			break;
	}
	switch (e)
	{
		case 1:
			p=f;
			break;
		case 2:
		    p=31+f;
		    break;
		case 3:
			p=59+f;
			break;
		case 4:
			p=90+f;
			break;
		case 5:
			p=120+f;
			break;
		case 6:
			p=151+f;
			break;
		case 7:
			p=181+f;
			break;
		case 8:
			p=212+f;
			break;
		case 9:
			p=243+f;
			break;
		case 10:
			p=273+f;
			break;
		case 11:
			p=304+f;
			break;
		case 12:
			p=334+f;
			break;
	}

	n=n+p-o;
	printf("%d",n);
	return 0;
	}
int main()
{
	int styear,stmonth,stday,edyear,edmonth,edday,month,year,sum=0;
	cin>>styear>>stmonth>>stday>>edyear>>edmonth>>edday;
	if (edyear==styear)
	{
		if (edmonth==stmonth)
			sum=edday-stday;
		else
		{
			for (month=stmonth;month<=edmonth-1;month++)
			{
				switch (month)
				{
				case 2: sum+=28; break;
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12: sum+=31; break;
				default: sum+=30; break;
				}
			}
			if (((styear%4==0&&styear%100!=0)||(styear%400==0))&&stmonth<=2&&edmonth>2)
				sum++;
			sum=sum+edday-stday;
		}
	}
	else
	{
		for (year=styear;year<=edyear;year++)
		{
			if ((year%4==0&&year%100!=0)||(year%400==0))
				sum+=366;
			else
				sum+=365;
		}
		if (stmonth>1)
		{
			for (month=1;month<=stmonth-1;month++)
			{
				switch (month)
				{
				case 2: sum-=28; break;
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12: sum-=31; break;
				default: sum-=30; break;
				}
			}
			if (((styear%4==0&&styear%100!=0)||(styear%400==0))&&stmonth>2)
				sum-=1;
		}
		sum-=stday;
		for (month=edmonth;month<=12;month++)
		{
			switch (month)
			{
			case 2: sum-=28; break;
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12: sum-=31; break;
			default: sum-=30; break;
			}
		}
		if (((edyear%4==0&&edyear%100!=0)||(edyear%400==0))&&edmonth<=2)
			sum-=1;
		sum+=edday;
	}
	cout<<sum<<endl;
	return 0;
}
void main()
{
  int a,b,c,d,e=0,f,i,Syear,Smonth,Sday,Eyear,Emonth,Eday;
  scanf("%d%d%d%d%d%d",&Syear,&Smonth,&Sday,&Eyear,&Emonth,&Eday);
  a=Eyear-Syear;
  switch(Smonth)
  {
  case 1:b=0;break;
  case 2:b=31;break;
  case 3:b=59;break;
  case 4:b=90;break;
  case 5:b=120;break;
  case 6:b=151;break;
  case 7:b=181;break;
  case 8:b=212;break;
  case 9:b=243;break;
  case 10:b=273;break;
  case 11:b=304;break;
  case 12:b=334;break;
  }
  switch(Emonth)
  {
  case 1:c=0;break;
  case 2:c=31;break;
  case 3:c=59;break;
  case 4:c=90;break;
  case 5:c=120;break;
  case 6:c=151;break;
  case 7:c=181;break;
  case 8:c=212;break;
  case 9:c=243;break;
  case 10:c=273;break;
  case 11:c=304;break;
  case 12:c=334;break;
  }
  d=Eday-Sday;
  for(i=Syear+1;i<=Eyear-1;i++)
     if((i%4==0&&i%100!=0)||(i%400==0)) e+=1;
  if((Syear%4==0&&Syear%100!=0)||(Syear%400==0)&&(Smonth>=3)) e+=1;
  if((Eyear%4==0&&Eyear%100!=0)||(Eyear%400==0)&&(Emonth>=3)) e+=1;
  f=365*a+c-b+d+e;
  printf("%d",f);
  printf("\n");
}
int main()
{
	int y1,m1,d1,y2,m2,d2,ans=0,p,i;
	int m[]={31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);
	if(y2-y1==0)
	{
		if(m2-m1==0)
			ans=d2-d1;
		else
		{
			if((y1%4==0&&y1%100!=0)||(y1%400==0))
				m[1]=29;
			for(i=m1;i<m2;i++)
				ans+=m[i-1];
			ans=ans=d1+d2;
		}
	}
	else
	{
		for(i=y1;i<y2;i++)
		{
			if((i%4==0&&i%100!=0)||(i%400==0)) 
				ans+=366;
			else
				ans+=365;
		}
			if((y1%4==0&&y1%100!=0)||(y1%400==0))
				m[1]=29;
			for(p=1;p<m1;p++)
				ans-=m[p-1];
			ans-=d1;
			if((y2%4==0&&y2%100!=0)||(y2%400==0))
				m[1]=29;
			else
				m[1]=28;
			for(p=1;p<m2;p++)
				ans+=m[p-1];
			ans+=d2;
	}
	printf("%d\n",ans);
	return 0;
}
int  NO[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int  SP[12]={31,29,31,30,31,30,31,31,30,31,30,31};

int boolean(int year)
{
	if  ((year % 4 == 0 /*&& year % 100 != 0*/) || (year % 400 == 0)) return 1 ;
	   else return 0;
}
void main()
{
	long i,sum,y1,m1,d1,y2,m2,d2;
	scanf("%d%d%d",&y1,&m1,&d1);
	scanf("%d%d%d",&y2,&m2,&d2);
	sum=0;
	for (i=1;i<=m1-1;i++)
		if (boolean(y1)==1)
	      sum=sum-NO[i];
		else sum=sum-SP[i];
	sum=sum-d1;
	for (i=1;i<=m2-1;i++)
	  if (boolean(y1)==1)
	      sum=sum+NO[i];
		else sum=sum+SP[i];
	sum=sum+d2;
	for (i=y1;i<=y2-1;i++)
		if (boolean(i)==1) sum=sum+366;
		else sum=sum+365;
	printf("%ld\n",sum);
}
int main()
{
	int y1,y2,m1,m2,d1,d2,i,d=0,y[13]={0,31,28,31,30,31
		,30,31,31,30,31,30};
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
	for(i=y1;i<y2;i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
		{
			d=d+366;
		}
		else
		{
			d=d+365;
		}
	}
	for(i=m1;i>1;i--)
	{
		if(i==2&&(y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
		{
			d=d-29;
		}
		else
		{
			d=d-y[i-1];
		}
	}
	d=d-d1+1;
	for(i=1;i<m2;i++)
	{
		if(i==2&&(y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))
		{
			d=d+29;
		}
		else
		{
			d=d+y[i];
		}
		
	}
	d=d+d2-1;
	cout<<d;
	
	return 0;
}
/*
 * c.cpp
 * ?????
 * ????: 2011-1-9
 * ???????????
 */

int main(void)
{
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};//????????
	int b[12]={31,29,31,30,31,30,31,31,30,31,30,31};//???????
	int sy,sm,sd,ey,em,ed;
	int i,sum=0,days=0;//????
	int days1=0,days2=0;
	cin>>sy>>sm>>sd;
	cin>>ey>>em>>ed;
	for(i=sy+1;i<=ey-1;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))//?????
			sum+=366;
		else sum+=365;
	}
	if(ey-sy!=0)//???
	{
	if((sy%4==0&&sy%100!=0)||(sy%400==0))
	{
		for(i=0;i<sm-1;i++)
			days+=b[i];
		days+=sd;
		sum+=(366-days);
	}
	else
	{
		for(i=0;i<sm-1;i++)
			days+=a[i];
		days+=sd;
		sum+=(365-days);
	}
	days=0;
	if((ey%4==0&&ey%100!=0)||(ey%400==0))
	{
		for(i=0;i<em-1;i++)
			sum+=b[i];
		sum+=ed;
	}
	else
	{
		for(i=0;i<em-1;i++)
			sum+=a[i];
		sum+=ed;
	}}
    else//???
	{
		if((sy%4==0&&sy%100!=0)||(sy%400==0))//?????
		{
			for(i=0;i<sm-1;i++)
				days1+=b[i];
			days1+=sd;
			for(i=0;i<em-1;i++)
				days2+=b[i];
			days2+=ed;
			sum=days2-days1;
		}
		else
		{
			for(i=0;i<sm-1;i++)
				days1+=a[i];
			days1+=sd;
			for(i=0;i<em-1;i++)
				days2+=a[i];
			days2+=ed;
			sum=days2-days1;
		}
	}
	cout<<sum<<endl;
	return 0;
}
int main()
{
	int y1,y2,m1,m2,d1,d2;
	cin>>y1>>m1>>d1>>y2>>m2>>d2;
	int sum,sum1=0,sum2=0;
	int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int i;
	for(i=1;i<y1;i++)
	{
		if((i%4==0&&i%100!=0)||i%400==0)
			sum1=sum1+366;
		else
			sum1=sum1+365;
	}
	if((y1%4==0&&y1%100!=0)||y1%400==0)
		a[2]=29;
	if(m1>1)
	{for(i=1;i<=m1-1;i++)
	sum1=sum1+a[i];}
	
	
		sum1=sum1+d1;
	a[2]=28;
	for(i=1;i<y2;i++)
	{
		if((i%4==0&&i%100!=0)||i%400==0)
			sum2=sum2+366;
		else
			sum2=sum2+365;
	}
	if((y2%4==0&&y2%100!=0)||y2%400==0)
		a[2]=29;
	if(m2>1)
	{
	for(i=1;i<=m2-1;i++)
		sum2=sum2+a[i];}
	sum2=sum2+d2;
	sum=sum2-sum1;
	cout<<sum;
	return 0;
}