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 <string>
using namespace std;

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

long long daycount(int year , int month , int day)
{
	long long total = 0;
	total += year * 365;		//year??´1???1??\?????§?????\??°
	for (int i = 1; i <= month; i++)
	{
		total += Emonth[i];			//1???1??\???month???1??\?????§?????\??°(???????????´??????????????????)
	}
	
	total += year / 4;
	total -= year / 100;
	total += year / 400;		//???????????´????????°

	if (((year % 4 == 0) && (year % 100 != 0 || year % 400 == 0)) && (month < 3))
	{
		total--;		//???????????´??????2???29??\??????????????????????????§?????????????????????
	}

	total += day;		//1??\???day??\?????§?????\??°

	return total;
}


int main()
{
	int y1, y2, m1, m2, d1, d2;
	while (1)
	{
		long long total1 = 0, total2 = 0;
		cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
		if (y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2< 0) break;

		total1 = daycount(y1, m1, d1);
		total2 = daycount(y2, m2, d2);

		cout << total2 - total1 << endl;

	}


	return 0;
}

C++: #include <iostream>

using namespace std;

int conpute( int y,int m, int d ){

  int day = 0;

  for( int i = 1 ; i < y ; i++ ){
    day += 365;
    if( i % 4 == 0 ){
      day++;
    }
    if( i % 100 == 0 ){
      day--;
    }
    if( i % 400 == 0 ){
      day++;
    }
  }
  
for( int i = 1 ; i <= m ; i++ ){
    switch(i){

    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 9:
    case 10:
    case 12:
      day += 31;
      break;
    case 2:
      day += 28;
      if( i % 4 == 0 ){
	day++;
      }
      if( i % 100 == 0 ){
	day--;
      }
      if( i % 400 == 0 ){
	day++;
      }
      break;
    case 4:
    case 6:
    case 11:
      day += 30;
      break;
    }
  }
  day += d;
  return day;
}


int main(void){

  int y1,y2;
  int m1,m2;
  int d1,d2;

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

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

//ツ誕ツ青カツ年ツづ債。ツ年ツづ個端ツ青板づ個禿コツ青板づーツ計ツ算ツつキツづゥツづ個づ可猟伉用ツつキツづゥ
int monthList[] = {31,28,31,30,31,30,31,31,30,31,30};

bool is_leapyear(int y){
	return ( y%4 == 0 && ( y%100 != 0 || y%400 == 0 ) )? true : false ;
}

int add_day1(int m1, int d1){
	int cnt = 0;
	for(int i=0 ; i < m1 - 1 ; i++ ){
		cnt += monthList[i];
	}
	cnt += d1 - 1;
	return (365 - cnt);
}

int add_day2(int y1, int y2){
	int cnt = 0;
	for(int i = y1 + 1 ; i < y2 ; i++ ){
		cnt += (is_leapyear(i))? 366 : 365 ;
	}
	return cnt;
}

int add_day3(int y2 ,int m2 ,int d2 ){
	int cnt = 0;
	for(int i=0 ; i < m2 - 1 ; i++ ){
		cnt += monthList[i];
		if( is_leapyear( y2 ) && i ){
			cnt++;
		}
	}
	return (cnt + d2 - 1);
}

int main(){
	int y1, m1, d1, y2, m2, d2;
	while( cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2 ){
		if( y1 == -1 ) break;
		
		int ans = 0;
		ans += add_day1( m1 , d1 );
		ans += add_day2( y1 , y2 );
		ans += add_day3( y2 , m2 , d2 );
		if( is_leapyear( y1 ) && m1 <= 2 ){
    	    ans++;
    	}
    	if( y1 == y2 ){
    		ans -= 365;
    	}
    	if( y1 == 0 )
    		ans--;
		cout << ans << endl;
	}
}

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

int days(int y, int m, int d)
{
    if (m <= 2) {
        --y;
        m += 12;
    }
    int dy = 365 * (y - 1);
    int c = y / 100;
    int dl = (y >> 2) - c + (c >> 2);
    int dm = (m * 979 - 1033) >> 5;
    return dy + dl + dm + d - 1;
}

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;
        }
        cout << days(y2, m2, d2) - days(y1, m1, d1) << endl;
    }
    return 0;
}

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

int main(){

  long long int y1,m1,d1,y2,m2,d2;
  long long int ans = 0;
  int m[] = {31,28,31,30,31,30,31,31,30,31,30,31};

  while(true){
    cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
    if(y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0) break;

    ans = 0;
    for(int i=y1;i<y2;i++){
      ans += 365;
      if(i%400 == 0 || (i%4 == 0&& i%100 != 0)) ans++;
    }

    for(int i=0;i<m1;i++) ans -= m[i];
    if((y1%400 == 0 || (y1%4 == 0 && y1%100 != 0)) && m1 <= 2) ans--;
    ans -= d1;

    for(int i=0;i<m2;i++) ans += m[i];
    if((y2%400 == 0 || (y2%4 == 0 && y2%100 != 0)) && m1 > 2) ans++;
    ans += d2;

    cout << ans << endl;

  }
}

C++: #include <bits/stdc++.h>
using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

int is_leap(int y){
  if(y % 400 == 0) return 366;
  else if(y % 100 == 0) return 365;
  else if(y % 4 == 0) return 366;
  return 365;
}
const int days[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int y,y2,d,d2,m,m2;
  while(cin >> y >> m >> d >> y2 >> m2 >> d2){
    if(y < 0 || m <= 0 || d <= 0 || y2 < 0|| m2 <= 0|| d2 <= 0) break;
    ll ans = 0;
    rep(i,m){
      ans -= days[i];
    }
    if(is_leap(y) == 366 && m > 2) --ans;
    ans -= d;
    while(y2 - y != 0){
      ans += is_leap(y);
      ++y;
    }
    rep(i,m2){
      ans += days[i];
    }
    if(is_leap(y2) == 366 && m2 > 2) ++ans;
    ans += d2;
    cout << ans << endl;
  }
  return 0;
}