首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
ysl777
2024年3月22日 22:48
打印日期 题解:
P1410
回复 0
|
赞 1
|
浏览 750
#include<bits/stdc++.h> using namespace std; int f[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; bool isLeapYear(int x){ if(x % 400 == 0 || (x % 4 == 0 && x % 100 != 0)){ return true; ...
Cookie‘s AE86
2024年3月16日 09:21
打印日期 题解:C++实现
P1410
回复 0
|
赞 2
|
浏览 861
#include<bits/stdc++.h> using namespace std ; //判断是否是闰年 bool judge(int year){ if(year % 4 == 0 ){ if(year % 100 == 0) if(year % 400 == 0) return true ; else return false; else return true ; }else return false...
easymoney
2024年3月12日 12:33
打印日期 题解:(60%)
P1410
回复 1
|
赞 1
|
浏览 916
//通过率60% #include <stdio.h> int main() { int year = 0, month = 0, day = 0; int n = 0; int f[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; scanf("%d%d",&year,&n); if ((y...
小酒
2024年3月11日 15:30
打印日期 题解:
P1410
回复 0
|
赞 0
|
浏览 685
1410解题思路 #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 y,d; while(scanf("%d %d",&y,&d)!=EOF) { &nbs...
lilililili
2024年3月10日 23:56
打印日期 题解:c语言-简短
P1410
回复 0
|
赞 0
|
浏览 798
#include<stdio.h> int main(){ int i,year,day,num=0,a[12]={31,28,31,30,31,30,31,31,30,31,30,31}; while(scanf("%d%d",&year,&day)!=EOF){ if(year%400==0||(year%4==0&&year%100!=0)) &n...
huanghu
2024年3月10日 00:12
打印日期 题解:C++
P1410
回复 0
|
赞 0
|
浏览 640
#include<stdio.h> #include<iostream> using namespace std; int main(){ int year,n; while(cin>>year>>n){ int arr[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; bool isLeap = year%400==0 || year%100!=0 && year%4==0; ...
FIVEszc
2024年3月8日 22:10
打印日期 题解:C 显示60%通过,求大佬帮我看看哪里的问题
P1410
回复 1
|
赞 0
|
浏览 1.3k
#include <stdio.h> int main() { int y,n; while(scanf("%d %d",&y,&n) != EOF){ int d,month=1,i=1; int mon[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; if(y%400==0||(y%4==0&&y%100!=0)) mon[2]=29; for(;i<13;i++) {n=n-mon[i]; if(n==0)n++; if(n<0...
williams
2024年3月5日 18:00
打印日期 题解:
P1410
回复 0
|
赞 0
|
浏览 1.7k
#include <stdio.h> #include <stdbool.h> #include <math.h> #include <string.h> int main(void) { int y,n; int run[12]={31,29,31,30,31,30,31,31,30,31,30,31}; int normal[12]={31,28,31,30,31,30,31,31,30,31,30,31}; while(scanf("%d %d",&y,&n)!=...
小王桐学
2024年3月1日 18:26
打印日期 题解:C
P1410
回复 0
|
赞 0
|
浏览 811
#include <stdio.h> void PrintDate(int d[],int y,int n) { if((y % 400 == 0) || (y % 100 != 0 && y % 4 == 0)) //判断闰年 d[1]++; int i; for(i = 0; i < 12; i++) { if(n <= 0) break; else n -= d[i]; } n = n+d[i-1]; if(i >= 9) if(n >= 10) printf...
DestinyCares+++
2024年1月28日 10:04
打印日期 题解:1410
P1410
回复 0
|
赞 0
|
浏览 996
#include<bits/stdc++.h> using namespace std; bool isrun(int y){ if(((y%4==0)&&(y%100!=0))||(y%400==0)) return true; else return false; } int date[13][2]={{0,0},{1,31},{2,28},{3,31},{4,30},{5,31},{6,30},{7,31},{8,31},{9,30},{10,31},{11,...
1
2
3
4
题目
打印日期
题解数量
34
发布题解
在线答疑
热门题解
1
打印日期 题解:只有60% ,求大佬提点
2
打印日期 题解:
3
打印日期 题解:求大佬解释下为什么只有60%通过率
4
打印日期 题解:C语言题解 多组输入
5
打印日期(用前缀和写了一下 附注释) 题解:
6
打印日期 题解:
7
打印日期 题解:暴力题解
8
打印日期 题解:C++实现
9
蒟蒻作法
10
打印日期 题解:遍历题,注意break,不break在输入2000 31的时候会错误