提交时间:2019-09-16 12:25:55
运行 ID: 65
#include<iostream> int main(){ int a,b; scanf("%d %d",&a,&b); switch(b){ case 1:printf("%d",31);break; case 2: if(((b%4==0)&&(b%100!=0))||((b%100==0)&&(b%400==0))){ printf("%d",29); }else{ printf("%d",28); } break; case 3:printf("%d",31);break; case 4:printf("%d",30);break; case 5:printf("%d",31);break; case 6:printf("%d",30);break; case 7:printf("%d",31);break; case 8:printf("%d",31);break; case 9:printf("%d",30);break; case 10:printf("%d",31);break; case 11:printf("%d",30);break; case 12:printf("%d",31);break; default:printf("error"); } return 0; }