#include <iostream> using namespace std; bool is_leap(int year) { return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0; } int main() { int y, m, d, ans = 0; cin >> y >> m >> d; int L_m_d[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int nonL_m_d[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; if (is_leap(y)) //判断闰年 { for (int i = 0; i < m; i++) //记录1-(m-1)月天数 { ans += L_m_d[i]; } ans += d; } else { for (int i = 0; i < m; i++) { ans += nonL_m_d[i]; } ans += d; } cout << ans << endl; return 0; }