#include<iostream> #include<algorithm> #include<string> using namespace std; void nextday(int& y, int& m, int& d) { int dayMonth[] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 }; bool isLeap = y % 400 == 0 || y % 4 == 0 && y % 100 != 0; if (isLeap) { dayMonth[2] = 29; } else { dayMonth[2] = 28; } d++; if (d > dayMonth[m]) { m++; d = 1; } if (m > 12) { m = 1; y++; } } int main() { int date1, date2; while (cin >> date1 >> date2) { int day = date1 % 100; date1 /= 100; int month = date1 % 100; int year = date1 / 100; int res = 1; while (year * 10000 + month * 100 + day != date2) { nextday(year, month, day); res++; } cout << res << endl; } return 0; }