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++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    int month[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

    for(;;){
        int y[2], m[2], d[2];
        for(int i=0; i<2; ++i){
            cin >> y[i] >> m[i] >> d[i];
            if(y[i] < 0 || m[i] < 0 || d[i] < 0)
                return 0;
        }

        long long sum[2] = {0};
        for(int i=0; i<2; ++i){
            for(int j=1; j<y[i]; ++j){
                sum[i] += 365;
                if(j % 400 == 0 || (j % 100 != 0 && j % 4 == 0))
                    ++ sum[i];
            }
            for(int j=1; j<m[i]; ++j){
                sum[i] += month[j];
                if(j == 2 && (y[i] % 400 == 0 || (y[i] % 100 != 0 && y[i] % 4 == 0)))
                    ++ sum[i];
            }
            sum[i] += d[i];
        }

        cout << (sum[1] - sum[0]) << endl;
    }
}

C++: #include<iostream>
using namespace std;
int Q(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 a,b,c,d,e,f,g;
  while(cin>>a>>b>>c>>d>>e>>f){
    cout<<Q(d,e,f)-Q(a,b,c)<<endl;
  }
}

C++: #include<iostream>

using namespace std;

bool isLeap(int y)
{
	if(y%400==0)	return true;
	if(y%100==0)	return false;
	if(y%4==0)		return true;
	return false;
}

int NumberOfDays(int y,int m,int d)
{
	int num=0;
	int mon[]={0,31,28,31,30,31,30,31,30,30,31,30,31};
	if(isLeap(y))	mon[2]++;

	for(int i=1;i<y;i++)	num+=isLeap(i)?366:365;
	for(int i=1;i<m;i++)	num+=mon[i];
	num+=d-1;

	return num;
}

int main()
{
	int y1,m1,d1,y2,m2,d2;
	while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
		if(!(~y1&&~m1&&~d1&&~y2&&~m2&&~d2))	break;
		cout<<NumberOfDays(y2,m2,d2)-NumberOfDays(y1,m1,d1)<<endl;
	}
	return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

int f(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;
}

void solve() {
  int y1, m1, d1, y2, m2, d2;
  while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2, y1 != -1) {
    cout << f(y2, m2, d2) - f(y1, m1, d1) << endl;
  }
}

C++: #include<iostream>
#include<list>
#include<string>
#include<map>
#include<vector>
using namespace std;
bool step(int y2) {
	if ((y2) % 4 == 0) {
		if ((y2) % 100 == 0) {
			if ((y2) % 400 == 0)
				return true;
			else
				return false;
		}
		else
			return true;
	}
	else
		return false;
}
int main(){
	int y1, m1, d1, y2, m2, d2;
	int m[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
	while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2 && y1>=0) {
		if (step(y2) && m2 >= 2)
			d2++;
		while (y2 != y1) {
			y2--;
			if (step(y2))
				d2 += 366;
			else
				d2 += 365;	
		}
		while (m2 < m1) {
			m2++;
			if (m2 == 2 && step(y1)) 
				d2--;
			d2 -= m[m2-1];
		}
		while (m2 > m1) {
			m2--;
			if (m2 == 2 && step(y1))
				d2++;
			d2 += m[m2 - 1];
		}
		d2 -= d1;
		cout << d2 << endl;
	}
	int lk;
	cin >> lk >> lk;
}

C++: #include<iostream>
#include<list>
#include<string>
#include<map>
#include<vector>
using namespace std;
bool step(int y2) {
	if ((y2) % 4 == 0) {
		if ((y2) % 100 == 0) {
			if ((y2) % 400 == 0)
				return true;
			else
				return false;
		}
		else
			return true;
	}
	else
		return false;
}
int main(){
	int y1, m1, d1, y2, m2, d2;
	int m[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
	while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2 && y1>=0) {
		int y3 = y2, d3 = d2;
		while (y2 != y1) {
			y2--;
			if (step(y2)&&y2!=y1)
				d2 += 366;
			else
				d2 += 365;	
		}
		if (step(y3) && m2 >= 2)
			d2++;
		while (m2 < m1) {
			m2++;
			if (m2 == 2 && step(y1)) 
				d2--;
			d2 -= m[m2-1];
		}
		while (m2 > m1) {
			m2--;
			if (m2 == 2 && step(y1))
				d2++;
			d2 += m[m2 - 1];
		}
		d2 -= d1;
		cout <<d2<< endl;
	}
	int lk;
	cin >> lk >> lk;
}

C++: /*
AizuOnline A0125
Title
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
//#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
int day_of_month_table[12]={31,28,31,30,31,30,31,31,30,31,30,31};
//
int isLeap(int y)
{
  if((y % 400)==0)
    return(1);
  if((y % 100)==0)
    return(0);
  if((y % 4)==0)
    return(1);
  return(0);
}
int day_of_year(int y)
{
  return(365+isLeap(y));
}
int day_of_month(int y,int m)
{
  return(day_of_month_table[m-1]+((isLeap(y)&&(m==2))?1:0));
}
int datediff(int y1,int m1,int d1,int y2,int m2,int d2)
{
  int i,s;

  if(y1==y2)
   
      if(m1==m2)
	return(d2-d1);
      else
	{
	  s = day_of_month(y1,m1)-d1;
	  if(m2 > m1+1)
	    for(i=m1+1;i<=m2-1;i++)
	      s += day_of_month(y1,i);
	  return(s+d2);
	}
    
  else
    {
      s = datediff(y2,1,1,y2,m2,d2)+1;
      if(y2 > y1+1)
	for(i=y1+1;i<=y2-1;i++)
	  s += day_of_year(i);
      s += datediff(y1,m1,d1,y1,12,31);
      return(s);
    }
}
main()
{
  int y1,m1,d1,y2,m2,d2,ret;
  printf("2001=%d\n",isLeap(2001));
  while(scanf("%d %d %d %d %d %d",&y1,&m1,&d1,&y2,&m2,&d2) 
	&& (y1!=-1 || m1!=-1 || d1!=-1 ||y2!=-1 || m2!=-1 || d2!=-1 ))
    {
      ret=datediff(y1,m1,d1,y2,m2,d2);
      printf("%d\n",ret);
    }

return(0);
}