请问这个代码运行正确,半角空格也是在英文状态下打出来的,但为什么用例不通过呢
#include <stdio.h>
int main()
{int n,y,r,t;//年月日天
scanf("%d %d %d",&n,&y,&r);
switch(y)//1 3 5 7 8 10 12
{
case 12:t+=30;
case 11:t+=31;
case 10:t+=30;
case 9:t+=31;
case 8:t+=31;
case 7:t+=30;
case 6:t+=31;
case 5:t+=30;
case 4:t+=31;
case 3:t+=28+(n%4==0&&n%100!=0||n%400==0);
case 2:t+=(31+r);break;
case 1:t=r;break;
}
printf("%d",t);
return 0;
}