#include<stdio.h>
void main()
{
int year,month,day;
int months[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int days;
int i;
while(scanf("%d/%d/%d",&year,&month,&day)!=EOF)
{
days=0;
if(year%4==0&&year%100!=0||year%400==0)
{
months[2]=29;
}
else
{
months[2]=28;
}
for(i=1;i<month;i++)
{
days=days+months[i];
}
printf("%d\n",days+day);
}
}
HDU - 2005
最新推荐文章于 2020-09-10 19:49:08 发布