该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
这是我写的,编译正确,但是提交却不是百分百正确(就是错误了)
#include
int main()
{
int a,b,c,t;
b>=1&&b<=12;
c>=1&&c<=31;
scanf("%d %d %d",&a,&b,&c); if((a/4==0&&a/100!=0)||(a/400==0))
{
if(b==1)
t=c;
else if(b==2)
t=31+c;
else if(b==3)
t=31+29+c;
else if(b==4)
t=31+29+31+c;
else if(b==5)
t=31+29+31+30+c;
else if(b==6)
t=31+29+31+30+31+c;
else if(b==7)
t=31+29+31+30+31+30+c;
else if(b==8)
t=31+29+31+30+31+30+31+c;
else if(b==9)
t=31+29+31+30+31+30+31+31+c;
else if(b==10)
t=31+29+31+30+31+30+31+31+30+c;
else if(b==11)
t=31+29+31+30+31+30+31+31+30+31+c;
else if(b==12)
t=31+29+31+30+31+30+31+31+30+31+30+c;
} else
{
if(b==1)
t=c;
else if(b==2)
t=31+c;
else if(b==3)
t=31+28+c;
else if(b==4)
t=31+28+31+c;
else if(b==5)
t=31+28+31+30+c;
else if(b==6)
t=31+28+31+30+31+c;
else if(b==7)
t=31+28+31+30+31+30+c;
else if(b==8)
t=31+28+31+30+31+30+31+c;
else if(b==9)
t=31+28+31+30+31+30+31+31+c;
else if(b==10)
t=31+28+31+30+31+30+31+31+30+c;
else if(b==11)
t=31+28+31+30+31+30+31+31+30+31+c;
else if(b==12)
t=31+28+31+30+31+30+31+31+30+31+30+c;
} printf("%d",t);
return 0;
}