杭电oj 2005 第几天
刚做了一下2005
感觉还行,发现我的代码比搜出来的还少点
当然了,我算了不少
发出来,仅供参考
#include<stdio.h>
int main()
{
int a,b,c,out=0;
int d[13]={0,0,31,59,90,120,151,181,212,243,273,304,334};
int e[13]={0,0,31,60,90,121,152,182,213,244,274,305,335};
while(scanf("%d/%d/%d",&a,&b,&c)!=EOF)
{
if(a%4==0&&a%100!=0 || a%400==0)
{
out=e[b]+c;
}else
{
out=d[b]+c;
}
printf("%d\n",out);
}
return 0;
}