题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2005
//C++代码
#include<iostream>
using namespace std;
int main(){
int y,m,d;
const int a[12]={0,31,59,90,120,151,181,212,243,273,304,334};
char ch;
while(cin>>y>>ch>>m>>ch>>d){
int ans=a[m-1];
ans+=d;
if(((y%4==0 && y%100!=0) || y%400==0) && m>2) ans++;
cout<<ans<<endl;
}
return 0;
}