Run ID:11966

提交时间:2021-05-18 16:29:02

#include <bits/stdc++.h> using namespace std; int t[]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int main() { int s=0; int y,m,d; cin >> y >> m >> d; if(y%4==0 && y%100!=0 || y%400==0) t[2]=29; for(int i=1;i<m;i++) s+=t[i]; s+=d; cout << s; return 0; }