文章
11
粉丝
70
获赞
0
访问
6.6k
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
using namespace std;
#include <string.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <stdlib.h>
bool isLeapYear(int year) {
if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
return true;
}
else {
return false;
}
}
int days[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
int sum(int n) {
int day, month, year;
day = n % 100;
n /= 100;
month = n % 100;
n /= 100;
year = n % 10000;
n /= 10000;
int res = 0;
for (int i = year-1; i > 0; i--) {
if (isLeapYear(i)) {
&nbs...
登录后发布评论
暂无评论,来抢沙发