首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
dhh390
2025年3月19日 16:32
日期累加 题解:c语言,注意一下坑就行
P1446
回复 0
|
赞 5
|
浏览 131
#include <stdio.h> #include <string.h> #include<stdlib.h> #include<math.h> int main() { int n; scanf("%d",&n); int i; int year,mon,day,k; int mon_day[]={0...
zxjrheaven
2025年3月12日 23:12
日期累加 题解:暴力
P1446
回复 0
|
赞 3
|
浏览 151
#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}; void run(date1 a) { if((a.year%4==0...
Howie_Waves
2024年8月28日 18:28
日期累加 题解:
P1446
回复 0
|
赞 22
|
浏览 1.5k
//AC代码 //方法一---一天一天加 #include<bits/stdc++.h> using namespace std; int main() { int a; cin >> a; int f[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30 ,31}; while(a--) { int y, m, d, n; cin >> y >> m >> d >> n; if(y % 400 ...
可可爱爱草莓派
2024年8月24日 16:27
日期累加 题解:注释了函数的功能
P1446
回复 0
|
赞 5
|
浏览 527
#include<bits/stdc++.h> using namespace std; int m[] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; int judge(int year){//用于判断闰年,修改2月份天数,并返回这一年有多少天 int year_day; if(year % 400 == 0|| year %4 == 0 && year % 100 != 0) { ...
damowanghwj
2024年3月30日 18:27
日期累加 题解:c++ 易于看懂 和 理解版本
P1446
回复 0
|
赞 12
|
浏览 966
/*日期累加*/ #include<bits/stdc++.h> using namespace std; bool is_Leap(int year){//判断闰年 if(year % 400 == 0 || (year % 100 != 0 && year % 4 == 0)){ return true; } return false; } int mday[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; int main() { ...
渐鸿于陆
2024年3月24日 09:54
日期累加 题解:成功AC,注意下年份增加了,要重新判断平闰年
P1446
回复 0
|
赞 10
|
浏览 803
#include<stdio.h> int days[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; int main(void){ int m; int year,month,day,num; scanf("%d",&m); while(m--){  ...
FIVEszc
2024年3月16日 18:13
日期累加 题解:每次都判断下是闰年还是平年,题目不难但有坑
P1446
回复 0
|
赞 6
|
浏览 955
#include <bits/stdc++.h> using namespace std; int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int main() { int m; scanf("%d",&m); for(int i=0;i<m;i++) { int y,m,d,n; scanf("%d%d%d%d",&y,&m,&d,&n); for(int j=0;j<n;j+...
huanghu
2024年3月15日 11:51
日期累加 题解:
P1446
回复 0
|
赞 2
|
浏览 601
#include <stdio.h> #include <iostream> using namespace std; int main(){ int arr[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; int n; cin >> n; while(n--){ int year, month, day, count; cin >> year >> month >> day >...
我爱陈少熙
2024年3月11日 17:32
日期累加 题解:c语言版
P1446
回复 0
|
赞 7
|
浏览 709
每次做这种题目都会忘记判断闰年的时候写else,给大家提个醒,都是小细节 #include<stdio.h> int main() { int n,y,m,d,sum; scanf("%d",&n); int year1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; while(n) { scanf("%d%...
小酒
2024年3月11日 15:25
日期累加 题解:
P1446
回复 5
|
赞 2
|
浏览 784
1446:为何正确率一直是75%,大佬帮忙看一下,谢谢! #include <bits/stdc++.h> using namespace std; int main() { int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int m,year,month,day,days; scanf("%d",&a...
1
2
3
题目
日期累加
题解数量
29
发布题解
在线答疑
热门题解
1
日期累加 题解:
2
日期累加 题解:c++ 易于看懂 和 理解版本
3
日期累加 题解:成功AC,注意下年份增加了,要重新判断平闰年
4
日期累加 题解:c语言版
5
日期累加 题解:每次都判断下是闰年还是平年,题目不难但有坑
6
日期累加 题解:注释了函数的功能
7
日期累加 题解:c语言,注意一下坑就行
8
日期累加 题解:暴力
9
日期累加 题解:跨年之后需要重新重新计算二月份天数,否则只能通过百分之五十
10
1446 日期累加。详细思路分析