提交时间:2019-09-20 21:52:34

运行 ID: 533

#include<iostream> int main(){ int a,s; scanf("%d %d",&a,&s); if(s!=2&&(s%2==0&&s<7)||(s%2==1&&s>8%%s<=12)){ printf("30"); }else if(s!=2&&(s%2==1&&s<8)||(s%2==0&&s>7&&s<=12)){ printf("31"); }else if(s==2&&(a%4==0&&a%100!=0)||(a%400==0&&a%3200!=0)){ printf("29"); }else{ printf("28"); } return 0; }