[编程入门]宏定义之闰年判断(C语言) 摘要:解题思路:直接在宏定义里判断并赋值,main函数里输出注意事项:参考代码:#include <stdio.h>#define leapyear(y) y%100==0?(y%400==0?'L…… 题解列表 2022年04月04日 0 点赞 0 评论 290 浏览 评分:0.0
C++推导通项公式 摘要:解题思路:注意事项: 推导一下通项公式An=1/1+An-1简化一下计算参考代码:#include<iostream>#include<cstdio>using namespace std…… 题解列表 2022年04月04日 0 点赞 0 评论 484 浏览 评分:0.0
某人看见没有题解表示不满给个参考 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>#include<algorithm>using namespace std;const int N…… 题解列表 2022年04月04日 0 点赞 0 评论 538 浏览 评分:0.0
C语言训练-求矩阵的两对角线上的元素之和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j; int n; int sum=0; int t=0; int a[100][100]; int…… 题解列表 2022年04月04日 0 点赞 0 评论 373 浏览 评分:0.0
二级C语言-同因查找 摘要:解题思路:注意事项:参考代码:#include<stdio.h>double fcat(int n) {//实现阶乘 double sum = 1; for (int i = 2; i <= n; i…… 题解列表 2022年04月04日 0 点赞 0 评论 397 浏览 评分:0.0
题解 1923: 蓝桥杯算法提高VIP-学霸的迷宫(BFS JAVA简洁代码) 摘要:解题思路:非常简单经典的bfs题目,唯一不同的是需要交换子节点的访问顺序,来保证同一长度下字典序最小的输出。以下对代码做简单说明1.代码中先将01倒置,因为int类型的默认值为0,这样就不需要手动生成…… 题解列表 2022年04月04日 0 点赞 0 评论 1148 浏览 评分:0.0
暴力枚举每一天 摘要: `import java.util.Scanner; public class 回文日期 { static int days[]= {0,31,28,31,30,31,30,31,3…… 题解列表 2022年04月04日 0 点赞 0 评论 612 浏览 评分:0.0
最简单没有之一 摘要:解题思路: 运用while(scanf("%d %d",&a,&b)!=EOF),边输入边输出。注意事项: 这种写法有点取巧,scanf("%d\n",&c);只为应付检查而存在。参考…… 题解列表 2022年04月04日 0 点赞 0 评论 274 浏览 评分:0.0
等比数列解决,一行代码C语言 摘要:解题思路: 该题是个等比数列问题,每一天的值都是连续等比的,可以推公式:a(n)=3*2^(n-1)-2 带入代码注意事项:参考代码:#include<stdio.h>#include<m…… 题解列表 2022年04月04日 0 点赞 0 评论 451 浏览 评分:0.0
C++贪心法做个笔记期末复习用,说标题太短不让我发 摘要:解题思路:老师上课讲的,做个笔记期末复习用注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int maxn=1005;int n,…… 题解列表 2022年04月05日 0 点赞 0 评论 343 浏览 评分:0.0