萧小白


私信TA

用户名:g7xcy

访问量:2687

签 名:

等  级
排  名 3683
经  验 1812
参赛次数 0
文章发表 14
年  龄 0
在职情况 学生
学  校
专  业

  自我简介:

解题思路:

注意事项:

参考代码:

#include
using namespace std;
struct time{
    int year;
    int month;
    int day;
}a;
int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};

int main(){
    int t(0);
    cin>>a.year>>a.month>>a.day;
    for(int i=1;i<a.month;i++)
        t+=month[i];
    t+=a.day;
    if(!(a.year%400)||(a.year%100&&!(a.year%4)))
        t++;
    cout<<t<<endl;
    return 0;
}


 

0.0分

0 人评分

  评论区