首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
driftBaron
2026年3月12日 21:04
日期计算 题解:
P1051
回复 0
|
赞 0
|
浏览 14
#include<iostream> #include<algorithm> using namespace std; struct a{ int year; int month; int day; }; int is29(int year,int (&mon)[13]){//int* mon//int mon[] if((year%400==0)||(year%4==0&&...
bro
2026年2月4日 16:18
日期计算 题解:c++
P1051
回复 0
|
赞 12
|
浏览 302
#include <bits/stdc++.h> using namespace std; int monDay[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; struct Times{ int year; int month; int day; }Tm; int restDay(int month,int day){ int sum = 0; if(month == 1...
xsw
2026年2月1日 19:21
日期计算 题解:
P1051
回复 0
|
赞 3
|
浏览 163
#include<iostream> using namespace std; bool is_year(int year) { return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0); } int main() { int y, m, d; while (cin >> y >> m >> d) { int month[15] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30...
mlx
2026年1月30日 22:31
日期计算 题解:
P1051
回复 0
|
赞 5
|
浏览 191
#include<iostream> using namespace std; int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int check(int year) { if(year%4==0&&year&100!=0||year%400==0) return 1; return 0; } int main() { int year,month,day; while(cin>>year>>month>>...
曾不会
2026年1月24日 19:16
日期计算 题解:
P1051
回复 0
|
赞 2
|
浏览 165
每个条件都要看到 #include<stdio.h> int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int fun(int x){ if(x%4==0&&x%100!=0||x%400==0) { return 1; } return 0; } int ma...
无名1
2025年8月30日 19:24
日期计算 题解:C++ 50%正确率看这里
P1051
回复 0
|
赞 8
|
浏览 1.0k
#include<bits/stdc++.h> using namespace std; struct data{ int y; int m; int d; }; // 判断月份和日是否合理 bool isTrue(data c){ if(c.m>12||c.m<1){ return false; }else{ if(c.m==1||c.m==3||c.m==5||c.m==7||c.m==8||c.m==10||c.m==12){ if(c.d>=1&&c.d<=31){ ...
leo110
2025年5月12日 21:17
日期计算 题解:先计算第几天然后判断输入合不合法
P1051
回复 0
|
赞 3
|
浏览 1.2k
#include<iostream> using namespace std; int f[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; struct date{ int year,month,day; }; int main(){ date d; while(cin>>d.year>>d.month>>d.day){  ...
西电机试专家
2025年3月15日 11:37
日期计算 题解:棒棒题解
P1051
回复 0
|
赞 12
|
浏览 1.3k
#include <bits/stdc++.h> using namespace std; int run(int a){ if((a%4==0&&a%100!=0)||a%400==0) return 1; return 0; } struct data{ int y; int m; &n...
yeee700
2025年3月10日 18:34
日期计算 题解:
P1051
回复 0
|
赞 5
|
浏览 1.1k
有大佬指出哪里错误吗,为啥只有50%的正确率 #include <stdio.h> typedef struct node{ int year,month,day; }p; int main(){ p date; while(scanf("%d %d %d",&date.year,&date.month,&date.day)!=EOF){ int day[12]={31,28,31,30,31,30,31,31,30,31,30...
ASDF807
2025年3月7日 11:09
日期计算 题解:50%,不知道哪里错了
P1051
回复 5
|
赞 12
|
浏览 1.1k
#include<stdio.h> struct Time { int year; int month; int day; }; int IsLegal(int month) { if(month>=1 && month<=12) { return 1;...
1
2
3
4
...
6
题目
日期计算
题解数量
59
发布题解
在线答疑
热门题解
1
日期计算 题解:
2
日期计算 题解:AC50%不知道什么原因 有没有大佬帮忙看看
3
日期计算 题解:AC为50%,不知道哪里有问题,求解
4
日期计算 题解:50%,不知道哪里错了
5
日期计算 题解:c++
6
日期计算 题解:棒棒题解
7
日期计算 题解:
8
日期计算 题解:有人能看看为啥ac50%吗
9
日期计算 题解:按教材上敲的怎么通过只有百分之五十
10
日期计算 题解:C++ 50%正确率看这里