文章
1
粉丝
18
获赞
0
访问
973
#include<bits/stdc++.h>
using namespace std;
int cal_days(int year,int month,int day)
{
int days[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
int sum=0;
sum += (year-1)*365;
sum += year/4;
sum -= year/100;
sum += year/400;
if((year%4==0 and year%100!=0)or year%400==0)
{
days[1]=29;
}
int i=month-2;
while(i>=0){
sum+=days[i];
i--;
}
sum+=day;
return sum;
}
int...
登录后发布评论
暂无评论,来抢沙发