提交时间:2019-10-06 11:10:51

运行 ID: 1193

#include<iostream> int main(){ int year,month,day; scanf("%d %d",&year,&month); switch(month){ case 1:day=31;break; case 2: if(year%4==0){ if(year%100==0){ if(year%400==0){ if(year%3200==0){ day=29; }else{ day=28; } }else{ day=29; } }else{ day=29; } }else{ day=28; } break; case 3:day=31;break; case 4:day=30;break; case 5:day=31;break; case 6:day=30;break; case 7:day=31;break; case 8:day=31;break; case 9:day=30;break; case 10:day=31;break; case 11:day=30;break; case 12:day=31;break; default:day=0; } printf("%d",day); return 0; }