题解 | 今年的第几天?
#include<iostream>
using namespace std;
int main(){
int Y,M,D;
while(cin>>Y>>M>>D){
bool leapyear=(Y%4==0&&Y%100!=0)||(Y%400==0);
int month[]={31,leapyear?29:28,31,30,31,30,31,31,30,31,30,31};
int order=0;
for(int i=0;i<M-1;i++){
order=order+month[i];
}
order=order+D;
cout<<order<<endl;
}
return 0;
}

