提交时间:2019-09-16 12:22:48

运行 ID: 63

#include<iostream> int main(){ int a,b; scanf("%d %d",&a,&b); switch(b){ case 1:printf("%d",31);break; case 2: if((0 == b % 4 && 0 != b % 100) || 0 == b % 400){ printf("%d",28); }else{ printf("%d",29); } 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; }