首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
苍灵
2025年9月1日 18:42
日期类 题解:C++
P1437
回复 0
|
赞 0
|
浏览 100
#include<bits/stdc++.h> using namespace std; struct data{ int y; int m; int d; }; // 输出这个日期的后一天的日期(不考虑闰年) void mHou(data a){ int num[12]={31,28,31,30,31,30,31,31,30,31,30,31}; a.d++; if(a.d>num[a.m-1]){ a.d=1; a.m++; } if(a.m>12){ a.m=1; a.y++; ...
cczz
2025年8月5日 17:51
日期类 题解:
P1437
回复 0
|
赞 0
|
浏览 133
#include<bits/stdc++.h> using namespace std; int month[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; bool isLeapYear(int y){ return (y % 400 == 0 || (y % 4 == 0 && y % 100 != 0)); } int main(){ int n; cin >> n; int y, m, d; while(n-- > 0){ cin...
zxjrheaven
2025年3月12日 22:19
日期类 题解:暴力
P1437
回复 0
|
赞 8
|
浏览 1.2k
#include <bits/stdc++.h> using namespace std; struct date1 { int year; int moon=0; int day=0; }dat1[10005]; int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int main() { int n; &...
yeee700
2025年3月11日 12:17
日期类 题解:
P1437
回复 0
|
赞 5
|
浏览 616
#include<stdio.h> int main(){ int m; scanf("%d",&m); int months[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int year; int month; int day; // 总的思路。输入一个处理一个 ...
渐鸿于陆
2024年3月23日 21:50
日期类 题解:成功AC,nice
P1437
回复 1
|
赞 9
|
浏览 1.2k
#include<stdio.h> int days[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; int main(void){ int year,month,day,n; scanf("%d",&n); while(n--){ scanf("%d%d%d",&year,&...
Candour
2024年5月16日 23:26
日期类(模拟) 题解:
P1437
回复 0
|
赞 8
|
浏览 1.1k
#include<bits/stdc++.h> using namespace std; int month[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int n; int y, m, d; bool cheak(int y) { return y % 4 == 0 && y % 100 != 0 || y % 400 == 0; } int main() { cin >> n; while(n --) ...
flipped
2024年3月23日 20:53
日期类 题解:
P1437
回复 0
|
赞 0
|
浏览 794
#include<stdio.h> #include<stdbool.h> bool isL(int year) { if((year%4==0&&year%100!=0)||year%400==0) return true; else return false; } int main() { int n; int y,m,d; scanf("%d",&n); int f[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; int year[1...
小酒
2024年3月11日 15:31
日期类 题解:
P1437
回复 0
|
赞 0
|
浏览 744
1437解题思路 #include <bits/stdc++.h> using namespace std; int main() { int m;//输入个数 int year,month,day; int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; scanf("%d",&m);...
小王桐学
2024年3月1日 19:59
日期类 题解:C
P1437
回复 0
|
赞 1
|
浏览 927
#include <stdio.h> void PrintDate(int *y,int *m,int *d) { int r[12] = {31,28,31,30,31,30,31,31,30,31,30,31}; if(*d - r[*m-1] == 0) { if(*m == 12) //跨年份跨月份 { (*y)++; *m = 1; *d = 1; } else //不跨年份跨月份 { (*m)++; *d = 1; } } else (*d)++...
DestinyCares+++
2024年1月29日 15:48
日期类 题解:
P1437
回复 0
|
赞 1
|
浏览 1.2k
#include<iostream> #include <stdio.h> using namespace std; int main(){ int date[12][2]={{1,31},{2,28},{3,31},{4,30},{5,31},{6,30},{7,31},{8,31},{9,30},{10,31},{11,30},{12,31}}; int m,n,year,month,day; cin>>m; &nbs...
1
2
题目
日期类
题解数量
20
发布题解
在线答疑
热门题解
1
日期类 题解:成功AC,nice
2
日期类 题解:暴力
3
日期类(模拟) 题解:
4
日期类 题解:
5
P1437 解题思路分享
6
日期类 题解:C++实现
7
日期类 题解:
8
日期类 题解:
9
题目没有闰年,在此就没考虑
10
话说这题不是让写一个类吗?