首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
408真题
专业课程
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
xiaowaya
2025年3月20日 20:40
打印日期 题解:暴力题解
P1410
回复 0
|
赞 3
|
浏览 135
#include<bits/stdc++.h> #include<string> using namespace std; int mons[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; bool run(int y){ if((y%400==0)||(y%4==0&&y%100!=0)){ return true; }else{ &nbs...
Elysiaaaaaaa
2025年3月12日 20:17
打印日期 题解:
P1410
回复 0
|
赞 3
|
浏览 178
#include <iostream> using namespace std; int monthDays[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; bool isLeapYear(int year) { return ...
zxjrheaven
2025年3月12日 19:17
打印日期 题解:暴力
P1410
回复 0
|
赞 1
|
浏览 172
#include <bits/stdc++.h> using namespace std; struct date1 { int year; int moon=0; int day=0; }dat1[10005]; int month[12]={0,31,28,31,30,31,30,31,31,30,31,30}; void run(date1 a) { if((a.year%4==0&am...
OIsay-good
2024年3月19日 21:18
打印日期 题解:只有60% ,求大佬提点
P1410
回复 4
|
赞 12
|
浏览 2.2k
#include<stdio.h> struct node { int year,month,day,x; }p; int s[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int main(){ while (scanf("%d %d",&p.year,&p.x)!=EOF) { if(p.year%40...
Howie_Waves
2024年8月28日 11:53
打印日期 题解:
P1410
回复 0
|
赞 6
|
浏览 1.6k
#include<bits/stdc++.h> using namespace std; int main() { int m, n; int f[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; while(cin >> m >> n) { ...
Candour
2024年5月6日 00:29
打印日期(用前缀和写了一下 附注释) 题解:
P1410
回复 0
|
赞 4
|
浏览 1.6k
#include<bits/stdc++.h> using namespace std; int y, d; int month[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int s[13]; // month数组的前缀和 bool cheak(int year) { return (year % 4 == 0 && year % 100 != 0 )|| year % 400 == 0; } int main() { for(int ...
RingoCrystal
2024年4月6日 09:54
打印日期 题解:遍历题,注意break,不break在输入2000 3
P1410
回复 0
|
赞 2
|
浏览 669
这种题的本质就是单纯的顺序检索题,这个代码还可以优化,就是不用day,直接在else情况下break,此时输出为year,month,n,注意输出的格式 #include <bits/stdc++.h> using namespace std; int isLeap(int year){ if(year%400==0||(year%4==0&&year%100!=0)){ return 1; }else return 0; } int main(){ int year,n; int monthdata...
泛泛之交
2024年3月19日 14:47
打印日期 题解:求大佬解释下为什么只有60%通过率
P1410
回复 2
|
赞 6
|
浏览 718
#include <bits/stdc++.h> using namespace std; int month[]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int main() { int y,d; int m=1; while(scanf("%d%d",&y,&d)!=EOF){ &n...
flipped
2024年3月23日 17:53
打印日期 题解:C语言题解 多组输入
P1410
回复 0
|
赞 4
|
浏览 705
#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 year,days; while(scanf("%d %d",&year,&days)!=EOF) { int c=1;//记录月份 int m[13] = {0,3...
Śś
2024年3月23日 10:24
打印日期 题解:
P1410
回复 0
|
赞 0
|
浏览 471
#include<iostream> using namespace std; int days1[13] = {0,31,29,31,30,31,30,31,31,30,31,30,31};//闰年 int days2[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};//平年 int Judge(int x) { if(x%100==0) if(x%400==0)return 1; &nbs...
1
2
3
4
题目
打印日期
题解数量
34
发布题解
在线答疑
热门题解
1
打印日期 题解:只有60% ,求大佬提点
2
打印日期 题解:
3
打印日期 题解:求大佬解释下为什么只有60%通过率
4
打印日期(用前缀和写了一下 附注释) 题解:
5
打印日期 题解:C语言题解 多组输入
6
打印日期 题解:
7
打印日期 题解:暴力题解
8
打印日期 题解:C++实现
9
蒟蒻作法
10
打印日期 题解:遍历题,注意break,不break在输入2000 31的时候会错误