semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
// jisuanlianggeriqijiandetianshu.cpp : Defines the entry point for the console application.
//



int main()
{
	int yearr[13] = {0, 31,29,31,30,31,30,31,31,30,31,30,31};
	int yearp[13] = {0, 31,28,31,30,31,30,31,31,30,31,30,31};

	int sty = 0;
	int stm = 0;
	int str = 0;

	int eny = 0;
	int enm = 0;
	int enr = 0;

	int i = 0;
	int t = 0;
	int j = 0;

	int day = 0;
	int year = 0;
	int mon = 0;


	cin >> sty;
	cin >> stm;
	cin >> str;
	cin >> eny;
	cin >> enm;
	cin >> enr;

	for( i = 0;i <= eny - sty;i++ )
	{
		year = sty + i;

		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) ) 
		{
			if( year == sty && year != eny)
			{
				for( t = stm;t <= 12;t++ )
				{
					if( t == stm)
						day += yearr[t] - str;
					else
						day += yearr[t];
				}
			}
			if( year == eny && year != sty )
			{
				for( t =1;t <= enm;t++)
				{
					if( t== enm)
						day += enr;
					else
						day += yearr[t];
				}
			}

			if( year != eny && year!= sty )
			{
				for( t =1;t <= 12;t++ )
					day += yearr[t];
			}
			if( year == eny && year == sty )
			{
				if( stm == enm )
					day += enr - str;
				else
				{
					for( t = stm;t <= enm;t++ )
					{
						if( t == stm )
							day += yearr[t] - str;
						else if( t == enm )
						{
							day += enr;
						}
						else if( t!= stm && t!= enm )
							day += yearr[t];
					}
				}
			}
		}
		else
		{
			if( year == sty && year != eny)
			{
				for( t = stm;t <= 12;t++ )
				{
					if( t == stm)
						day += yearp[t] - str;
					else
						day += yearp[t];
				}
			}
			if( year == eny && year != sty )
			{
				for( t =1;t <= enm;t++)
				{
					if( t== enm)
						day += enr;
					else
						day += yearp[t];
				}
			}

			if( year != eny && year!= sty )
			{
				for( t =1;t <= 12;t++ )
					day += yearp[t];
			}
			if( year == eny && year == sty )
			{
				if( stm == enm )
					day += enr - str;
				else
				{
					for( t = stm;t <= enm;t++ )
					{
						if( t == stm )
							day += yearp[t] - str;
						else if( t == enm )
						{
							day += enr;
						}
						else if( t!= stm && t!= enm )
							day += yearp[t];
					}
				}
			}

		}
	}

	cout << day;

	cin >> i;

	return 0;
}
int main()
{
	int y1,m1,d1,y2,m2,d2,c1,c2,c,i1,i2,y;
	scanf("%d %d %d\n%d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);
	int days1[]={0,31,28,31,30,31,30,31,31,30,31,30,31},days2[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	if((y1%4==0)&&(y1%100!=0)||(y1%400==0)) {days1[2]++;}
	c1=d1;
	for(i1=1;i1<m1;i1++) {c1+=days1[i1];}
	if((y2%4==0)&&(y2%100!=0)||(y2%400==0)) {days2[2]++;}
	c2=d2;
	for(i2=1;i2<m2;i2++) {c2+=days2[i2];}
	y=y1;
	c=0;
	while(y<y2)
	{
        if((y%4==0)&&(y%100!=0)||(y%400==0)) c=c+366;
		else c=c+365;
		y++;
	}
	c=c-c1+c2;
	printf("%d",c);
	return 0;
}
int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int rdays[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int sum1(int year,int month, int day)
{
	int i,restday=day;
	for(i=1;i<month;i++)
	{
		if(year%4==0&&year%100!=0||year%400==0) restday=restday+rdays[i];
		else restday=restday+days[i];
	}
	return restday;
}
int main()
{
	int sy,sm,sd,ey,em,ed;
	scanf("%d%d%d %d%d%d",&sy,&sm,&sd,&ey,&em,&ed);
	int i,sum=0;
	for(i=sy;i<ey;i++)
	{  if(i%4==0&&i%100!=0||i%400==0) sum+=366;
	   else sum+=365;
	   }
	sum=sum+sum1(ey,em,ed)-sum1(sy,sm,sd);
	printf("%d",sum);
}
int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; 
int leapdays[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int leapyearornot(int year)
{
	return year % 400==0||year%4==0&&year%100!=0;
}
int sumfromfirstday(int year,int month,int day)
{
	int i,sum=day;
	for(i=1;i<month;i++)
	{
		if(leapyearornot(year))
			sum+=leapdays[i];
		else
			sum+=days[i];
	}
	return sum;
}

int daysfromfirst(int startyear,int endyear,int endmonth,int endday)
{
	int i,sum=0;
	for(i=startyear;i<endyear;i++)
	{
		sum+=leapyearornot(i)?366:365;
	}
	sum+=sumfromfirstday(endyear,endmonth,endday);
	return sum;
}

int main()
{
	int startyear,startmonth,startday,endyear,endmonth,endday;
	scanf("%d %d %d %d %d %d",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);
	printf("%d",daysfromfirst(startyear,endyear,endmonth,endday)-daysfromfirst(startyear,startyear,startmonth,startday));
	return 0;
}
int judge(int y)
{
	if(y%4==0&&y%100!=0||y%400==0)return 1;
	else return 0;
}
int main()
{
	int mouth[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 y1,y2,m1,m2,d1,d2,s1=0,s2=0,s3=0,s=0;
	cin>>y1>>m1>>d1>>y2>>m2>>d2;//??
	if(y1==y2)//???????
	{
	    for(int i=m1;i<m2;i++)
		{
			s=s+mouth[judge(y1)][i];//?????????
		}
		cout<<s+d2-d1<<endl;//??
	}
	else //??
	{
		for(int i=m1;i<=12;i++)
		{
			s1=s1+mouth[judge(y1)][i];//???????????
		}
		s1=s1-d1;
		for(int i=1;i<m2;i++)
		{
			s2=s2+mouth[judge(y2)][i];//???????????????
		}
		s2=s2+d2;
		for(int i=y1+1;i<y2;i++)
		{
			if(judge(i)==1)s3=s3+366;
			else s3=s3+365;
		}//???????????
		s=s1+s2+s3;//?????
		cout<<s<<endl;///??
	}
	return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2011-11-4
 *      Author: 11288
 */
int main(){
	int a[3001],i,y1,y2,m1,m2,d1,d2,s1=0,s2=0,j,m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},im[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	for(i=1;i<3001;i++){
		if((i%4==0&&i%100!=0)||i%400==0)
			a[i]=366;
		else a[i]=365;}
	cin>>y1>>m1>>d1>>y2>>m2>>d2;
	for(i=1;i<y1;i++)
		s1=s1+a[i];
	if((y1%4==0&&y1%100!=0)||y1%400==0)
		for(j=0;j<m1;j++)
		s1=s1+im[j];
	else for(j=0;j<m1;j++)
		s1=s1+m[j];
	s1=s1+d1;
	for(i=1;i<y2;i++)
		s2=s2+a[i];
	if((y2%4==0&&y2%100!=0)||y2%400==0)
		for(j=0;j<m2;j++)
		s2=s2+im[j];
	else for(j=0;j<m2;j++)
		s2=s2+m[j];
	s2=s2+d2;
	cout<<s2-s1<<endl;
	return 0;
}
int main()
{
	int sy, sm, sd,ey, em,ed,i,num = 0, k;
	cin >> sy >> sm >> sd >> ey >> em >> ed;
	if (sm <= 2)
	{
			for (i = sy; i < ey;i ++)
			{
				num+=365;
				if( (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
					++num;
			}
			if (sm ==2 && sd == 29) --num;
	}
	else
	{
			for (i = sy + 1; i <= ey;i ++)
			{
				num+=365;
				if( (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
					++num;
			}
	}
	if (em > sm)
	{
		num = num + (em - sm) *30;
		for (i = sm; i < em;i++)
		{
			switch(i)
			{
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12: ++num; break;
			case 2: 
				{
					if ((ey % 4 == 0 && ey % 100 != 0) || (ey % 400 == 0))
					num = num - 1;
					else 
						num = num - 2;
					break;
				}
			default: break;
			}
		}
		num = num + ed - sd;
	}
	else 
	{
		k= (sm - em) * 30;
		for (i = em; i < sm;i++)
		{
			switch(i)
			{
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12: ++k; break;
			case 2:
				{
					if ((ey % 4 == 0 && ey % 100 != 0) || (ey % 400 == 0))
					k = k - 1;
					else 
						k = k - 2; 
					break;
				}
			default: break;
			}
		}
		k = sd - ed + k;
		num = num - k;
	}
	cout << num << endl;						
	return 0;
}
int days( int y, int m, int d )
{
	int year[3001];
	
	for ( int i = 1; i <=3000; i++ )
	{
		if ( i % 4 == 0 && i % 100 != 0)
			year[i] = 366;
		else if (i % 400 == 0 )
			year[i] = 366;
		else year[i] = 365;
	}
	
	int month[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
	int loopmon[13] = {0,31,29,31,30,31,30,31,31,30,31,30,31};

	int days = 0;
	for ( int i = 1; i < y; i++)
		days += year[i];
	for ( int i = 1; i < m; i++)
	{
		if ( y % 4 == 0 && y % 100 != 0)
			days += loopmon[i];
		else if (y % 400 == 0 )
			days += loopmon[i];
		else days += month[i];
	}
	days += d;
	
	return days;
}

int main()
{
	int y1 = 0, m1 = 0, d1 = 0;
	int y2 = 0, m2 = 0, d2 = 0;
	
	cin >> y1 >> m1 >> d1;
	cin >> y2 >> m2 >> d2;
	
	cout << days( y2, m2, d2 ) - days( y1, m1, d1 );
	
	
	return 0;
}
int main()
{
	int sum = 0, i, j, date[2][3], a[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	for (i = 0; i < 2; i++)
		for (j = 0; j < 3; j++)
			cin >> date[i][j];
	for (i = date[0][0] + 1; i < date[1][0]; i++)
		if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0)
			sum += 366;
		else
			sum += 365;
	if (date[0][0] % 4 == 0 && date[0][0] % 100 != 0 || date[0][0] % 400 == 0)
		a[1] = 29;
	for (i = date[0][1]; i <= 11; i++)
		sum += a[i];
	sum += a[date[0][1] - 1] - date[0][2] + 1;
	if (date[1][0] % 4 == 0 && date[1][0] % 100 != 0 || date[1][0] % 400 == 0)
		a[1] = 29;
	else
		a[1] = 28;
	for (i = 0; i < date[1][1] - 1; i++)
		sum += a[i];
	sum += date[1][2];
	if (date[0][0] == date[1][0])
		cout << sum - 366 - a[1] + 28;
	else
		cout << sum - 1;
	return 0;
}
void main()
{
long int sy,sm,sd,ey,em,ed,a,b,i,j,k,x;
scanf("%d %d %d %d %d %d",&sy,&sm,&sd,&ey,&em,&ed);
a=1;i=0;

while(a<sy)
{
if((a%4==0&&a%100!=0)||(a%400==0)) 
{i++;a++;}
else
a++;
}
{
if(((sy%4==0 &&sy% 100 != 0)||(sy% 400 ==0))&&(sm>2))
i++;
}


b=1;j=0;
while(b<sm)
{
if((b==1)||(b==3)||(b==5)||(b==7)||(b==8)||(b==10)||(b==12))
{j++;
b++;}
else
{
if(b==2)
{j=j-2;b++;}
else
b++;
}

}
k=sy*365+sm*30+sd+j+i;


long int A,B,I,J,K;
I=0;A=1;

while(A<ey)
{
if((A%4==0 &&A% 100 != 0)||(A%400 ==0))
{
I++;
A++;
}
else
A++;
}

if(((ey%4==0&&ey%100!=0)||(ey% 400 ==0))&&(em>2))
I++;


B=1;J=0;
while(B<em)
{
if((B==1)||(B==3)||(B==5)||(B==7)||(B==8)||(B==10)||(B==12))
{J++;
B++;}
else
{
if(B==2)
{J=J-2;B++;}
else
B++;
}
}
K=ey*365+em*30+ed+J+I;
x=K-k;

printf("%d\n",x);
}
int main()
{
	int a,b,c,d,e,f,sum=0,i;
	int g=0;
	int m[]={31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
	i=a+1;
	while(i<d)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			sum++;
		}
		i++;
	}
	i=b-1;
	while(i<=11)
	{
		g+=m[i];
		i++;
	}
	g=g-c;
	i=0;
	while(i<e-1)
	{
		g+=m[i];
		i++;
	}
	g=g+f;
	g=g+sum;
	if((a%4==0&&a%100!=0)||(a%400==0))
	{
		if(b<=2)
		{
			g++;
		}
	}
	if((d%4==0&&d%100!=0)||(d%400==0))
	{
		if(e>=3)
		{
			g++;
		}
	}
	if(d>a)
	{
		g=g+(d-a-1)*365;
	}
	else if(a==d)
	{
		if((d%4==0&&d%100!=0)||(d%400==0))
		{
			g=g-366;
		}
		else
		{
			g=g-365;
		}
	}
	printf("%d\n",g);
	return 0;
}
int leap(int y)
{
  if(y%4==0&&y%100!=0)
  return 1;
  else if(y%400==0)
  return 1;
  else
  return 0;
}

void main()
{
    int sy,sm,sd; 
    int ey,em,ed; 
    int monthday[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}};
    scanf("%d %d %d",&sy,&sm,&sd);
    scanf("%d %d %d",&ey,&em,&ed); 
    int tmp;
    if((sy>ey)||(sy==ey && sm>em)||(sy==ey && sm==em && sd>ed))
  {
        tmp=sy; sy=ey; ey=tmp;
        tmp=sm; sm=em; em=tmp;
        tmp=sd; sd=ed; ed=tmp;
    }
    int ans=0;
    while(sy!=ey || sm!=em || sd!=ed){
        ans++;
        sd++;
        if(sd>monthday[leap(sy)][sm]){
            sd=1;
            sm++;
        } 
        if(sm==13){
            sm=1;
            sy++;
        } 
    }
printf("%d\n",ans);
}
void date(int *year,int *month ,int *day)
{
  if(*month==1||*month==3||*month==5||*month==7||*month==8||*month==10||*month==12)
     {
          (*day)++;
          if(*day>31) {*day=1;(*month)++;}
          if(*month>12) {*month=1;(*year)++;} 
     }
  else if(*month==4||*month==6||*month==9||*month==11)
    {
         (*day)++;
         if(*day>30){*day=1;(*month)++;}
    }
  else if((*year % 4 == 0 && *year % 100 != 0) || (*year % 400 == 0))
    {
         (*day)++;
		 if(*day>29){*day=1;(*month)++;}
    }
  else 
   {
        (*day)++;
		if(*day>28){*day=1;(*month)++;}
   }
}
void main()
{ 
	int a,b,c, x,y,z;
	scanf("%d%d%d%d%d%d",&a,&b,&c,&x,&y,&z);
	int i=0;
	for(i=0;a!=x||b!=y||c!=z;date(&a,&b,&c),i++);
    printf("%d",i);
	
	/*int a=2008,b=4 ,c=1;
	date(&a,&b,&c);
	printf("%d %d %d",a,b,c);*/
}
int main()
{
int a,b,c,u,v,w,e;
int sum=0;
int i,j,f[3000];
scanf("%d%d%d\n%d%d%d",&a,&b,&c,&u,&v,&w);
e=u-a-1;
switch(b)
{
case 1:sum=28+31+30+31+30+31+31+30+31+30+31+31-c;break;
  case 2:sum=31+30+31+30+31+31+30+31+30+31+28-c;break;
	case 3:sum=30+31+30+31+31+30+31+30+31+31-c;break;
		case 4:sum=31+30+31+31+30+31+30+31+30-c;break;
			case 5:sum=30+31+31+30+31+30+31+31-c;break;
				case 6:sum=31+31+30+31+30+31+30-c;break;
					case 7:sum=31+30+31+30+31+31-c;break;
						case 8:sum=30+31+30+31+31-c;break;
							case 9:sum=31+30+31+30-c;break;
								case 10:sum=30+31+31-c;break;
									case 11:sum=31+30-c;break;
										case 12:sum=0+31-c;break;
}
switch(v)
{
case 12:sum=sum+31+28+31+30+31+30+31+31+30+31+30+w;break;
  case 11:sum=sum+31+28+31+30+31+30+31+31+30+31+w;break;
	case 10:sum=sum+31+28+31+30+31+30+31+31+30+w;break;
		case 9:sum=sum+31+28+31+30+31+30+31+31+w;break;
			case 8:sum=sum+31+28+31+30+31+30+31+w;break;
				case 7:sum=sum+31+28+31+30+31+30+w;break;
					case 6:sum=sum+31+28+31+30+31+w;break;
						case 5:sum=sum+31+28+31+30+w;break;
							case 4:sum=sum+31+28+31+w;break;
								case 3:sum=sum+31+28+w;break;
									case 2:sum=sum+31+w;break;
										case 1:sum=sum+0+w;break;
}

if((a%4==0&&a%100!=0)||(a%400==0)&&(b<=2))
sum=sum+1;
if((u%4==0&&u%100!=0)||(u%400==0)&&(v>=3))
sum=sum+1;
if(e==-1)
{
	if((a%4==0&&a%100!=0)||(a%400==0))
	{sum=sum-366;}
	else{sum=sum-365;}
}
else if(e==0);
else
{
for(i=0;i<e;i++)
{f[i]=a+i+1;}
for(j=0;j<e;j++)
{
	if((f[j]%4==0&&f[j]%100!=0)||(f[j]%400==0))
		sum=sum+366;
	else
		sum=sum+365;
}
}
printf("%d",sum);
return 0;
}
int main ()
{
	int sy, sm, sd, ey, em, ed, res = 0;
    cin >> sy >> sm >> sd;
	cin >> ey >> em >> ed;
	int mon[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    while (sy != ey || sm != em || sd !=ed)
	{
		if ((sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0)) mon[2] = 29;
		else mon[2] = 28;
		sd++;
		if (sd > mon[sm])
		{	sd = 1; sm++;}
		if (sm > 12)
		{sm = 1; sy ++;}
		res++;
	}
	cout << res << endl;
	return 0;
}
int main()
{
	int a[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
	int startyear,endyear,startmonth,endmonth,startday,endday,days,days2,temp1,temp2,flag1,flag2;
	int year , month;
	cin >> startyear >> startmonth >> startday;
	cin >> endyear >> endmonth >> endday;
	if(startyear == endyear)
	{
		days = 0;
		if(startyear % 4 == 0 && startyear % 100 != 0 || startyear % 400 == 0)
			a[1] = 29;
		else
			a[1] = 28;
		for(month = startmonth ; month < endmonth ; month++)
			days = days + a[month - 1];
		days = days + endday - startday;
		cout << days << endl;
	}
	else if(startyear < endyear)
	{
		days = 0;
		days2= 0;
		for(year = startyear ; year < endyear ; year++)
		{
			if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
				days = days + 366;
			else
				days = days + 365;
		}
		flag1 = startmonth;
		flag2 = endmonth;
		if(startmonth > endmonth)
		{
			temp1 = startmonth;
			temp2 = startday;
			startmonth = endmonth;
			startday = endday;
			endmonth = temp1;
			endday = temp2;
		}
		if(endyear % 4 == 0 && endyear % 100 != 0 || endyear % 400 == 0)
			a[1] = 29;
		else
			a[1] = 28;
		for(month = startmonth ; month < endmonth ; month++)
			days2 = days2 + a[month - 1];
		days2 = days2 + endday - startday;
		if(flag1 > flag2)
			cout << days - days2 << endl;
		else
			cout << days + days2 << endl;
	}
	return 0;
}
int main()
{
	int GongJiTian(int, int, int);
	int year1, month1, day1, year2, month2, day2;
	scanf("%d %d %d", &year1, &month1, &day1);
	scanf("%d %d %d", &year2, &month2, &day2);
	int result, a, b;
	a=GongJiTian(year1,month1,day1);
	b=GongJiTian(year2,month2,day2);
	if(a>b){
		result=a-b;
	}else{
		result=b-a;
	}
	printf("%d", result);
	return 0;
}

int DiJiTian(int year, int month, int day){
	int isRunNian(int);
	int result=0;
	int i;
	for(i=1;i<month;i++){
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12){
			result+=31;
		}else if(i==4||i==6||i==9||i==11){
			result+=30;
		}else if(i==2){
			if(isRunNian(year)){
				result+=29;
			}else{
				result+=28;
			}
		}
	}
	result+=day;
	return result;
}

int isRunNian(int year){
	int result;
	if(year%400==0||((year%4==0)&&(year%100!=0))){
		result=1;
	}else{
		result=0;
	}
	return result;
}

int GongJiTian(int year, int month, int day){
	int DiJiTian(int, int, int);
	int result=0;
	int i;
	for(i=1;i<year;i++){
		if(isRunNian(i)){
			result+=366;
		}else{
			result+=365;
		}
	}
	result+=DiJiTian(year, month, day);
	return result;
}
int main()
{
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31},
	    b[12]={31,29,31,30,31,30,31,31,30,31,30,31},
	    startYear,startMonth,startDay,endYear,endMonth,endDay;
	scanf("%d%d%d%d%d%d",&startYear,&startMonth,&startDay,&endYear,&endMonth,&endDay);
	int i,sum=0,sum1=0,sum2=0;
     for (i=startYear;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=0;i<(startMonth-1);i++)
    		 sum1=sum1+b[i];
     }
     else
     {

    	    	 for (i=0;i<(startMonth-1);i++)
    	    		 sum1=sum1+a[i];
     }
     if ((endYear% 4 == 0 && endYear% 100 != 0) || (endYear % 400 == 0))
          {

         	 for (i=0;i<(endMonth-1);i++)
         		 sum2=sum2+b[i];
          }
     else
             {

            	 for (i=0;i<(endMonth-1);i++)
            		 sum2=sum2+a[i];
             }
     int m;
     m=sum-sum1-startDay+sum2+endDay;
     printf("%d\n",m);
}
int DiJiTian(int year,int month,int day);
int isRunNian(int year);
int main(){
	int year1,month1,day1;
	int year2,month2,day2;
	int zongyear;
	int zongday;
	int xiangchaday;
	int x,y;
	int i;
	int e,f,g;
	scanf("%d%d%d%d%d%d",&year1,&month1,&day1,&year2,&month2,&day2);
	if(year1>year2){
		e=year1;
		year1=year2;
		year2=e;
		f=month1;
		month1=month2;
		month2=f;
		g=day1;
		day1=day2;
		day2=g;
	}
	x=DiJiTian(year1,month1,day1);
	y=DiJiTian(year2,month2,day2);
	zongyear=year2-year1;
	zongday=zongyear*365;
	for(i=year1;i<year2;i++){
		if((i%100!=0&&i%4==0)||i%400==0){
			zongday+=1;
		}
	}
	xiangchaday=zongday+y-x;
	printf("%d",xiangchaday);
	return 0;
}
int DiJiTian(int year, int month, int day){
	int result = 0;
	for(int j = 1; j < month; j++){ 
		if(j==1||j==3||j==5||j==7||j==8||j==10||j==12){
			result += 31;	
		} else if (j == 4 || j ==6 || j == 9 || j==11){
			result += 30;
		} else if(j == 2){
			if(isRunNian(year)){
				result += 29;
			} else {
				result += 28;
			}	
		}
	}
	result += day;
	return result;	
}
int isRunNian(int year){
	int result;
	if(year%400 == 0 ||(year%4==0 && year%100!=0)){
		result = 1;
	} else{
		result = 0;
	}
      return result;	
}
int main()
{
	int y1,m1,d1,s1;int y2,m2,d2,s2;
	int i,s=0;
	int a[5000];
	scanf("%d%d%d",&y1,&m1,&d1);
	scanf("%d%d%d",&y2,&m2,&d2);
	for(i=y1;i<=y2;i++)
	{
		if(i%4==0&&i%100!=0||i%400==0) a[i]=1;
		else a[i]=0;
	}
	switch(m1)
	{
	case 1:s1=d1;break;
	case 2:s1=31+d1;break;
	case 3:s1=d1+31+28+a[y1];break;
	case 4:s1=d1+31+28+31+a[y1];break;
	case 5:s1=d1+31+28+31+30+a[y1];break;
	case 6:s1=d1+31+28+31+30+31+a[y1];break;
	case 7:s1=d1+31+28+31+30+31+30+a[y1];break;
	case 8:s1=d1+31+28+31+30+31+30+31+a[y1];break;
	case 9:s1=d1+31+28+31+30+31+30+31+31+a[y1];break;
	case 10:s1=d1+31+28+31+30+31+30+31+31+30+a[y1];break;
	case 11:s1=d1+31+28+31+30+31+30+31+31+30+31+a[y1];break;
	case 12:s1=d1+31+28+31+30+31+30+31+31+30+31+30+a[y1];break;
	}
	switch(m2)
	{
	case 1:s2=d2;break;
	case 2:s2=31+d2;break;
	case 3:s2=d2+31+28+a[y2];break;
	case 4:s2=d2+31+28+31+a[y2];break;
	case 5:s2=d2+31+28+31+30+a[y2];break;
	case 6:s2=d2+31+28+31+30+31+a[y2];break;
	case 7:s2=d2+31+28+31+30+31+30+a[y2];break;
	case 8:s2=d2+31+28+31+30+31+30+31+a[y2];break;
	case 9:s2=d2+31+28+31+30+31+30+31+31+a[y2];break;
	case 10:s2=d2+31+28+31+30+31+30+31+31+30+a[y2];break;
	case 11:s2=d2+31+28+31+30+31+30+31+31+30+31+a[y2];break;
	case 12:s2=d2+31+28+31+30+31+30+31+31+30+31+30+a[y2];break;
	}
	if(y1==y2) printf("%d",s2-s1);
	if(y2-y1==1) printf("%d",365+a[y1]-s1+s2);
	if(y2-y1>1)
	{
		for(i=y1+1;i<y2;i++)
		{
			s=s+365+a[i];
		}
		printf("%d",s+365+a[y1]-s1+s2);
	}
	return 0;
}
int mon[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int spec_year(int);
int main()
{
	
	void scan(int *year,int *month,int *day);
	long com_year(int y1,int y2);
	int com_month(int y1,int m1,int y2,int m2);
	int com_day(int y1,int m1,int d1,int y2,int m2,int d2);

	int year1,month1,day1;
	int year2,month2,day2;

	long sum=0;
	int k=0;

	scanf("%d %d %d",&year1,&month1,&day1);
	scanf("%d %d %d",&year2,&month2,&day2);
	
	sum+=com_year(year1,year2);
	sum+=com_month(year1,month1,year2,month2);
	sum+=com_day(year1,month1,day1,year2,month2,day2);

	printf("%d",sum);
	
	return 0;
}
long com_year(int y1,int y2)/*???????????*/
{
	int i;
	long sum=0; 
	for(i=y1+1;i<y2;i++)
	{
		if(spec_year(i))
			sum+=366;
		else
			sum+=365;
	}
	return sum; 
}
int com_month(int y1,int m1,int y2,int m2)/*???????????*/
{
	int i;
	int sum=0;
	if(y1!=y2)
	{
		if(spec_year(y1))
		{
			mon[1]=29;
		}
		if(m1!=m2)
		{
			for(i=m1;i<12;i++)
			{
				sum+=mon[i];
			}
			mon[1]=28;

			if(spec_year(y2))
			{
				mon[1]=29;
			}

			for(i=0;i<m2-1;i++)
			{
				sum+=mon[i];   
			}
			mon[1]=28;
		}
		else
		{
			for(i=m1-1;i<12;i++)
			{
				sum+=mon[i];    
			}
			mon[1]=28;

			if(spec_year(y2))
			{
				mon[1]=29;
			}

			for(i=0;i<m2-1;i++)
			{
				sum+=mon[i];   
			}
			mon[1]=28;
		}
	}
	else
	{ 
		if(spec_year(y1))
		{
			mon[1]=29;  
		}
		for(i=m1;i<m2-1;i++)
		{
			sum+=mon[i];
		}  
			mon[1]=28;
	} 
	return sum; 
}

int com_day(int y1,int m1,int d1,int y2,int m2,int d2)             /*?????????*/
{
	int sum=0;
 
	if(m1!=m2)
	{
		if(spec_year(y1))
		{
			mon[1]=29;  
		} 
  
		sum+=(mon[m1-1]-d1); 
  
		sum+=d2;
  
		mon[1]=28; 
	}
	else
	{
		sum+=d2-d1;
  
	}
 
	return sum;
}
int spec_year(int year) /*???????*/
{
	if((year%400==0)||((year%4==0)&&(year%100!=0)))
		return 1;
	else
		return 0;
}
int main()
{
	int y1,m1,d1;
	int y2,m2,d2;
	int ds1,ds2;
	int sum=0;
	int i;
	scanf("%d %d %d",&y1,&m1,&d1);
	scanf("%d %d %d",&y2,&m2,&d2);
	for(i=y1;i<y2;i++)
	{
		if((i%100!=0&&i%4==0)||(i%400==0))
			sum=sum+366;
		else
			sum=sum+365;
	}
	int days(int x,int y, int z);
	ds1=days(y1,m1,d1);
	ds2=days(y2,m2,d2);
	sum=sum+ds2-ds1;
	printf("%d",sum);
	return 0;
}
int days(int x,int y,int z)
{
	int sum=0;
	int Months[12]={31,28,31,30,31,30,31,31,30,31,30,31};
		if((x%100!=0&&x%4==0)||(x%400==0))
			Months[1]++;
		y--;
		while(y--)
		{
			sum=sum+Months[y];
		}
		sum=sum+z;
		return sum;
}
int main()
{
	int sy,sm,sd,ey,em,ed,i,sum=0;
	cin>>sy>>sm>>sd>>ey>>em>>ed;//????????
	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};//???????????
	for(i=sy;i<ey;i++)//???
		{if((i%4==0&&i%100!=0)||(i%400==0))
			sum+=366;
		else
			sum+=365;
		}
	if((sy%4==0&&sy%100!=0)||(sy%400==0))//???
	for(i=0;i<sm;i++)
		sum-=b[i];
	else
		for(i=0;i<sm;i++)
				sum-=a[i];
	if((ey%4==0&&ey%100!=0)||(ey%400==0))
	for(i=0;i<em;i++)
		sum+=b[i];
	else
		for(i=0;i<em;i++)
				sum+=a[i];
      sum=sum-sd;//?????
      sum=sum+ed;

      cout<<sum;//??
  return 0;



}
int main()
{
	int y1,m1,d1;
	int y2,m2,d2;
	int s1,s2,s,x1,x2;
	int z[14]={0,0,31,59,90,120,151,181,212,243,273,304,334,365};
	scanf("%d%d%d",&y1,&m1,&d1);
	scanf("%d%d%d",&y2,&m2,&d2);
	x1=y1%2800-1;
    s1=x1*365+z[m1]+y1/4+x1/400-y1/100+d1;
	x2=y2%2800-1;
    s2=x2*365+z[m2]+y2/4+x2/400-y2/100+d2;
	if(y1%4==0)
	{
		s=s2-s1+1;
	}
	else s=s2-s1;
	printf("%d",s);
	




	return 0;
}
int main()
{
	int i;
	int days=0;
	int monp[12]={31,28,31,30,31,30,31,31,30,31,30,31},monr[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	int year1,year2,mon1,mon2,day1,day2;
	cin>>year1>>mon1>>day1;
	cin>>year2>>mon2>>day2;	
	if(year1<year2)
	{
		if((year1%4==0&&year1%100!=0)||(year1%400==0))
		{
			for(i=mon1-1;i<12;i++)
			{
				days=days+monr[i];
			}
		}
		else
		{
			for(i=mon1-1;i<12;i++)
			{
				days=days+monp[i];
			}
		}
		days=days-day1;
		for(i=year1+1;i<=year2-1;i++)
		{
			if((i%4==0&&i%100!=0)||(i%400==0))
				days=days+366;
			else days=days+365;
		}
		if((year2%4==0&&year2%100!=0)||(year2%400==0))
		{
			for(i=0;i<mon2-1;i++)
				days=days+monr[i];
		}
		else 
		{
			for(i=0;i<mon2-1;i++)
				days=days+monp[i];
		}
		days=days+day2;
	}
	else if(year1==year2)
	{
		for(i=mon1-1;i<mon2-1;i++)
		{
			if((year1%4==0&&year1%100!=0)||(year1%400==0))
			{
				days=days+monr[i];
			}
			
			else {days=days+monp[i];}
			
		}
		days=days-day1+day2;
	}
			cout<<days;
return 0;
}