标签:scan bsp code 图片 pre class include col ret
#include <stdio.h> int main(){ int y,m,d; scanf("%d-%d-%d",&y,&m,&d); if(m==1||m==3||m==5||m==7||m==8||m==10||m==12){ if(d>0&&d<32){ printf("YES\n"); } else{ printf("NO\n"); } } if(m==4||m==6||m==9||m==11){ if(d>0&&d<31){ printf("YES\n"); } else{ printf("NO\n"); } } if(y<3001){ if(m==2){ if((y%100!=0&&y%4==0)||(y%100==0&&y%400==0)){ if(d<30&&d>0){ printf("YES\n"); } else{ printf("NO\n"); } } else{ if(d>0&&d<29){ printf("YES\n"); } else if(d>=29){ printf("NO\n"); } }
} } if(m<0||m>12){ printf("NO\n");
} return 0; }
标签:scan bsp code 图片 pre class include col ret
原文地址:https://www.cnblogs.com/p201821440031/p/10971444.html