首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
八千
2024年3月16日 17:56
日期计算 题解:按教材上敲的怎么通过只有百分之五十
P1051
回复 3
|
赞 8
|
浏览 1.4k
#include<stdio.h> struct node { int year; int month; int day; }p; int f[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; int main(){ while(scanf("%d %d %d",&p.year,&p.mon...
张会老儿
2024年3月13日 13:43
日期计算 题解:大佬看看我的代码,怎么一直是百分之50啊。日期判断没问
P1051
回复 1
|
赞 0
|
浏览 1.5k
#include<stdio.h> struct data{ int year; int month; int day; }; int daytab[2][13]={ {0,31,28,31,30,31,30,31,31,30,31,30,31}, {0,31,29,31,30,31,30,31,31,30,31,30,31}, }; int IsLeapYear(int year){ return (year%4==0&&year%100!=0)||year%4...
Cookie‘s AE86
2024年3月13日 10:50
日期计算 题解:
P1051
回复 0
|
赞 0
|
浏览 1.1k
#include<bits/stdc++.h> using namespace std; bool runjudge(int year); int main(){ int year, month, day; int run[] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; while(cin >> year >> month >> day){ if(runjudge(year)) run[2] = 29; ...
小酒
2024年3月11日 15:29
日期计算 题解:
P1051
回复 4
|
赞 2
|
浏览 1.9k
1051:为何正确率一直是50%呢 struct date{ int year; int month; int day; }p; #include <bits/stdc++.h> using namespace std; int main() { int a[13]={0,31,28,31,30,...
泛泛之交
2024年3月12日 11:16
__
P1051
回复 0
|
赞 0
|
浏览 917
分子
2024年3月11日 11:05
日期计算 题解:好心人帮我看看为什么只有50%通过率
P1051
回复 1
|
赞 0
|
浏览 1.0k
#include<stdio.h> struct node{ int year,month,day; }p; int m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int main(){ int num=0,i; scanf("%d %d %d",&p.year,&p.month,&p.day); } &n...
FIVEszc
2024年3月8日 21:10
日期计算 题解:C 显示50%不通过,有无大佬帮看一下
P1051
回复 3
|
赞 0
|
浏览 1.5k
#include <stdio.h> typedef struct data { int year; int month; int day; }dat; int mon[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; int main() { dat riqi; int m,d,sum=0,i=1; while (scanf("%d%d%d&q...
acv
2024年3月9日 10:16
日期计算 题解:为什么测试只通过50%
P1051
回复 1
|
赞 0
|
浏览 920
#include<iostream> using namespace std; struct date { int year; int month; int day; }; int main() { struct date d; int f[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 }; ...
光明守护神
2024年3月8日 19:02
日期计算 题解:C++
P1051
回复 0
|
赞 0
|
浏览 1.0k
谁知道写个这种题写那么久,还是要多练!!! #include<iostream> using namespace std; const int s[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; struct date { int year; int month; int day; }; bool is_goodyear(int n) { if (n % 400 == 0 || (n % 4 == 0 && n % 100 != 0)) { return...
zx142407789
2024年3月8日 17:59
日期计算 题解:自用笔记
P1051
回复 0
|
赞 2
|
浏览 1.2k
先准备存储月份的数组,其中2月份的天数根据是否年份确定,初始化为0天 判断是否错误数据:年份不能是负数,月份在合理范围内,日根据输入的月份来判断,日的判断是通过和初始化的数组逐一对比,如2月不可能出现30天 #include<stdio.h> typedef struct { int year; int month; int day; }date; int isyear(int x) {//闰年判断 if (x % 400 == 0) return 1; else if (x % 4 == 0 && x % 100...
1
2
3
4
5
6
题目
日期计算
题解数量
59
发布题解
在线答疑
热门题解
1
日期计算 题解:
2
日期计算 题解:AC50%不知道什么原因 有没有大佬帮忙看看
3
日期计算 题解:AC为50%,不知道哪里有问题,求解
4
日期计算 题解:50%,不知道哪里错了
5
日期计算 题解:c++
6
日期计算 题解:棒棒题解
7
日期计算 题解:
8
日期计算 题解:有人能看看为啥ac50%吗
9
日期计算 题解:按教材上敲的怎么通过只有百分之五十
10
日期计算 题解:C++ 50%正确率看这里