6 条题解
-
0
#include<stdio.h> int main() { int year, month, days; scanf("%d %d", &year, &month); switch(month) { case 1: case 3: case 5: case 7: case 8: case 10: case 12:days = 31; break; case 4: case 6: case 9: case 11:days = 30; break; case 2: if (year % 400 == 0 || year % 4 == 0 && year % 100 != 0) days = 29; else days = 28; break; } printf("%d",days); return 0; }
-
0
#include<stdio.h> int main(){ int x,y;1<=y&&y<=12; scanf("%d %d",&x,&y); switch(y){ case 1: case 3: case 5: case 7: case 8: case 10: case 12: printf("31");break; case 4: case 6: case 9: case 11: printf("30");break; case 2: if(x%40&&x%100!=0||x%4000) {printf("29"); }else printf("28");break; } return 0; }
- 1
信息
- ID
- 43
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- 递交数
- 3771
- 已通过
- 995
- 上传者