判断第几天(我也是闲,整了个switch来输出) 摘要:参考代码: ```c #include int leap(int year) { int k=year%100?(year%4?0:1):(year%400?0:1);//k为1,为…… 题解列表 2023年10月27日 0 点赞 0 评论 173 浏览 评分:0.0
这个比1246数据要强,考虑了闰年的情况 摘要:#include<bits/stdc++.h> using namespace std; int main() { int y,m,d; char c; while…… 题解列表 2024年08月04日 0 点赞 0 评论 185 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; …… 题解列表 2024年11月28日 0 点赞 0 评论 242 浏览 评分:0.0
判断第几天-题解(C语言代码)谁说我一个二本学生就不会写ACM,加油兄弟们。 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int y,m,d,time=0; int mon[12]; mon[1]=…… 题解列表 2020年08月16日 0 点赞 0 评论 363 浏览 评分:0.0
判断第几天-题解(C++代码) 摘要:```cpp #include #include #include using namespace std; bool pan_r(int y){ if(y%4==0&&y%…… 题解列表 2020年04月24日 0 点赞 0 评论 547 浏览 评分:0.0
判断第几天-题解(C语言代码) 摘要:#include #include #include #include int main() { int year,month,day; int a,b,c[12]={31,28,3…… 题解列表 2019年08月30日 0 点赞 0 评论 766 浏览 评分:0.0
数组待定选择 摘要:解题思路:把每个月之前的月份天数之和加起来待用注意事项:取值的时候由于数组的特性需要在月份上减1参考代码:#include<stdio.h>int run(int a);int main(){ …… 题解列表 2019年05月12日 0 点赞 0 评论 673 浏览 评分:0.0
判断第几天 (C语言代码) 摘要:解题思路:分闰年和非闰年计算;注意事项:注意int sum要在while循环中定义 sum=0 参考代码:#include<stdio.h>int main(){ int i,year,mont…… 题解列表 2019年03月10日 0 点赞 0 评论 499 浏览 评分:0.0
。。switch。。:判断第几天 (C语言代码) 摘要:#include<stdio.h> int main() { int y,m,d,n; while(scanf("%d/%d/%d",&y,&m,&d)!=EOF) { n=0;…… 题解列表 2019年03月04日 1 点赞 0 评论 633 浏览 评分:0.0
判断第几天 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(void){ int * days; int x, y, z, i, total; while (scanf("%d/…… 题解列表 2019年02月17日 0 点赞 0 评论 728 浏览 评分:0.0