四年润,百年不润,四百年润😀

#include <algorithm>
#include <vector>

using namespace std;

bool judge_leap(int year){
    bool leap = false;
    if(year%4==0&&year%100!=0)    leap =true;
    else if (year%400==0)    leap=true;
    else leap = false;
    return leap;
    
}

int main() {
    int year,month,day;
    while(cin>>year>>month>>day){
       bool leap = false;
        vector<int> v{31,28,31,30,31,30,31,31,30,31,30,31};
        leap = judge_leap(year);
        int sum_day = 0;
        for(int i =0;i<month-1;i++){
            sum_day+=v[i];
        }
        if(leap&&(month>2))sum_day+=1+day;
        else sum_day+=day;
        cout<<sum_day<<endl;
        
    }
}