Go: package main

import (
	"bufio"
		"os"
	"strings"
	"strconv"
		"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		input := strings.Split(scanner.Text(), " ")
		ele_t1 := [3]int{}
		ele_t2 := [3]int{}
		for i := range ele_t1 {
			ele_t1[i], _ = strconv.Atoi(input[i])
			ele_t2[i], _ = strconv.Atoi(input[i+3])
		}
		if ele_t1[0] < 0 || ele_t1[1] < 0 || ele_t1[2] < 0 ||
			ele_t2[0] < 0 || ele_t2[1] < 0 || ele_t2[2] < 0 {
				break
		}
		// t1 := time.Date(ele_t1[0], time.Month(ele_t1[1]), ele_t1[2], 0, 0, 0, 0, time.UTC)
		// t2 := time.Date(ele_t2[0], time.Month(ele_t2[1]), ele_t2[2], 0, 0, 0, 0, time.UTC)
		// diff := t2.Sub(t1)
		// fmt.Printf("%v\n", int64(diff/(time.Hour*24)))
		fmt.Println(ut2jd(ele_t2[0], ele_t2[1], ele_t2[2])-ut2jd(ele_t1[0], ele_t1[1], ele_t1[2]))
	}
}

func ut2jd(year, month, day int) int {
	if month <= 2 {
		year--
		month += 12
	}
	s := 3 + year/4 - year/100 + year/400
	s += 1720994 + year*365 + (month+1)*30 + (month+1)*3/5 + day
	return s
}

C++: J:0093 Leap Year??§?????£????????´???????????¢??°????????¨????????¨?\???§??????

#define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>

using namespace std;

typedef long long ll;
typedef pair<string,int> P;

bool isLeap(int i){
	return i % 400 == 0 
			? true : i % 100 == 0
			? false : i % 4 == 0
			? true : false;
}

int getSum(int y,int m,int d,const int* month){
	int sum=0;
	for(int i=0;i<y;i++){
		sum += isLeap(i) ? 366 : 365;
	}

	for(int i=1;i<m;i++){
		sum += i != 2 ? month[i] :
			isLeap(y) ? month[i] + 1 : month[i];
	}

	sum += d;

	return sum;
}

int main(){
	const int month[] = {-1,31,28,31,30,31,30,31,31,30,31,30,31};
	int y1, m1, d1, y2, m2, d2;
	while(~scanf("%d %d %d %d %d %d",&y1, &m1, &d1, &y2, &m2, &d2)){
		if(y1 < 0 || m1 < 0 || d1 < 0
			|| y2 < 0 || m2 < 0 || d2 < 0) break;

		cout << abs(getSum(y1,m1,d1,month) - getSum(y2,m2,d2,month)) << endl;
	}
}

C++: #include <iostream>
using namespace std;main(){int a,b,c,d,e,f,g,h[]={,,31,59,90,120,151,181,212,243,273,304,334};while(1){cin>>a>>b>>c>>d>>e>>f;if(a==-1)break;g=f-c+h[e]-h[b]+(d-a)*365;if(e<3)d--;if(b<3)a--;g+=d/4-a/4-d/100+a/100+d/400-a/400;cout<<g<<endl;}}

C++: #include <iostream>
using namespace std;

int daycount(int y, int m, int d) {
  if (m==1 || m==2) {
    --y;
    m+=12;
  }
  return (365*y + y/4 - y/100 + y/400 + (306*(m+1))/10 + d - 428);
}

int main() {
  int y1, m1, d1, y2, m2, d2;
  while (1) {
    cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2; 
    if (y1==-1 || m1==-1 || d1==-1 || y2==-1 || m2==-1 || d2==-1) break;
    cout << daycount(y2, m2, d2) - daycount(y1, m1, d1) << endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int month[12]={30,28,31,30,31,30,31,31,30,31,30,31};
int count(int y,int m,int d){//1/1/1~y/m/d?????\??°(1/1/1=1)
	int num=0;
	if((!(y%4)&&(y%100))||(!(y%400)))month[1]=29;
	for(int i=0;i<m-1;i++){
		num+=month[i];
	}
	num+=d;
	month[1]=28;
	return num;
}
int main()
{
	int y1,m1,d1,y2,m2,d2;
	while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
		if(y1<0||m1<0||d1<0||y2<0||m2<0||d2<0)break;
		int ans=0;
		if(y1==y2){
			ans=count(y2,m2,d2)-count(y1,m1,d1);
		}else if(y2-y1==1){
			ans=365-count(y1,m1,d1)+count(y2,m2,d2);
			if((!(y1%4)&&(y1%100))||(!(y1%400)))ans++;
		}else{
			y1++;y2--;
			ans+=(y2-y1+1)*365+(y2/4-y2/100+y2/400)-((y1-1)/4-(y1-1)/100+(y1-1)/400);
			ans+=count(++y2,m2,d2)+365-count(--y1,m1,d1);
			if((!(y1%4)&&(y1%100))||(!(y1%400)))ans++;
		}
		cout<<ans<<endl;

	}
    return 0;
}

C++: #include <iostream>
int MAX_DAY[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

class Data{
public:
	Data(int _year, int _month, int _day)
		: year(_year), month(_month), day(_day){}
	void add(){
		if(year%4 == 0){
			if(year%100 != 0 || year%400 == 0)
				MAX_DAY[2] = 29;
		}
		else
			MAX_DAY[2] = 28;
		if(day < MAX_DAY[month])day++;
		else{
			year += month / 12;
			month = month%12 + 1;
			day = 1;
		}
	}

	bool equals(Data d){
		return (d.year == year && d.month == month && d.day == day);
	}
	int year, month, day;
};

int main(){
	int y0, m0, d0, y1, m1, d1;
	while(std::cin >> y0 >> m0 >> d0 >> y1 >> m1 >> d1, y0 != -1){
		Data a = Data(y0, m0, d0), b = Data(y1, m1, d1);
		int count = 0;
		while(!a.equals(b)){
			a.add();
			count++;
		}
		std::cout << count << std::endl;
	}
}

C++: #include<iostream>
#include<cstdlib>
#include<ctime>
using namespace std;
int main(void){
	while( true ){
		int y1, m1, d1;
		int y2, m2, d2;
		struct tm t1, t2;
		double diff;
		time_t second1, second2;

		cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
		if( y1 == -1 && y2 == -1 && m1 == -1 && m2 == -1 && d1 == -1 && d2 == -1 )
			break;

		memset(&t1,0,sizeof(t1));
		memset(&t2,0,sizeof(t2));
		t1.tm_year = y1 - 1900;
		t1.tm_mon = m1 - 1;
		t1.tm_mday = d1;
		t2.tm_year = y2 - 1900;
		t2.tm_mon = m2 - 1;
		t2.tm_mday = d2;

		second1 = mktime( &t1 );
		second2 = mktime( &t2 );

		diff = difftime( second2, second1 );
		
		cout << (int)(diff / (3600*24)) << '\n';
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <string>
using namespace std;

int main(){
  int i,j,y[2],m[2],d[2],f;
  long long ans;
  while(1){
    f = 0;
    for(i=0;i<2;i++){
      cin >> y[i] >> m[i] >> d[i];
      if(y[i] == -1 || m[i] == -1 || d[i] == -1) f++;
    }
    if(f != 0) break;

    ans = (long long)(y[1] - y[0]) * 365 + (m[1] - m[0]) * 30 + d[1] - d[0];

    if(m[0] <= m[1]){
      for(i=m[0];i<m[1];i++){
	if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12) ans++;
      }
    }
    else{
      for(i=m[1];i<m[0];i++){
	if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12) ans++;
      }
    }

    for(i=y[0];i<=y[1];i++){
      if(i%4 == 0){
	if(i%400 == 0);
	else if(i%100 == 0) continue;
	if(i == y[0] && m[0] > 2) continue;
	else if(i == y[1] && m[0] <=2) continue;
	ans++;
      }
    }

    cout << ans << endl;

  }
  return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int main(){
	int x=28;
	int W=365;
	int cal[13]={0,31,x,31,30,31,30,31,31,30,31,30,31};
	int cal2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	int y1,m1,d1,y2,m2,d2;
	bool F=false;
	while(1){F=false;
		int ans=0;
		cin>>y1>>m1>>d1>>y2>>m2>>d2;if(y1==-1&&m1==-1&&d1==-1&&y2==-1&&m2==-1&&d2==-1)break;
		if(y1!=y2){
			if(y1%4==0)F=true;
			if(y1%100==0)F=false;
			if(y1%400==0)F=true;

			if(F==false)cal[2]=28;
			else cal[2]=29;
			ans+=cal[m1]-d1+1;
			//cout<<ans<<endl;
			for(int i=m1+1;i<=12;i++)
			{ans+=cal[i];
			//cout<<ans<<endl;
			}
			d1=1;m1=1;y1++;
			//cout<<ans<<endl;
		}
		while(y1!=y2){F=false;
				if(y1%4==0)F=true;
			if(y1%100==0)F=false;
			if(y1%400==0)F=true;
			if(F==false)W=365;
			else  W=366;
			ans+=W;
			y1++;
			//cout<<ans<<endl;
		}
		while(m1!=m2){
			for(int i=m1;i<m2;i++)
				ans+=cal[i];
			m1=m2;
		}
		ans+=d2-d1;
		cout<<ans<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

bool is_uruu(int y)
{
	return y % 400 == 0 || (y % 4 == 0 && y % 100 != 0);
}

int daymonth(int y, int m)
{
	if (m == 2)
	{
		return is_uruu(y) ? 29 : 28;
	}
	
	if (m == 4 || m == 6 || m == 9 || m == 11)
	{
		return 30;
	}

	return 31;
}

int daycount(int y, int m, int d)
{
	int ret = 0;

	for (int i = 1; i < y; i++)
	{
		ret += is_uruu(i) ? 366 : 365;
	}

	for (int i = 1; i < m; i++)
	{
		ret += daymonth(y, i);
	}

	ret += d;

	return ret;
}

int main()
{
	int y1, m1, d1, y2, m2, d2;

	while (true)
	{
		cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;

		if (y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0)
		{
			break;
		}

		cout << daycount(y2, m2, d2) - daycount(y1, m1, d1) << endl;
	}

	return 0;
}