完数的判断 for循环(c语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main(){ int N,a[200],i,j,l; scanf("%d",&N); for(i=1;i<=…… 题解列表 2024年05月30日 0 点赞 0 评论 431 浏览 评分:0.0
编写题解 1022: [编程入门]筛选N以内的素数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool qsh(int n) { for(int i=2;i<n;i++) {…… 题解列表 2024年05月30日 0 点赞 0 评论 751 浏览 评分:0.0
有规律的数列求和(c语言) 摘要:解题思路:假设分子为a,分母为b。Sn就为(a/b)+((a+b)/a)+(((a+b)+a)/(a+b))+......按照这个规律来设计代码。注意事项:参考代码:#include <stdio.h…… 题解列表 2024年05月30日 0 点赞 0 评论 411 浏览 评分:0.0
为何正确率如此低? ```cpp#includeusingnamespacestd;constintN=1e6+10;inta[N];intk,n;voiddfs(intx){if(a[x-2]&&a[x-1]){a[x]=(2*a[x-1]+a[x-2])%32767;return;}dfs(x-1);a[x]=(2* 题解列表 2024年05月30日 0 点赞 0 评论 727 浏览 评分:0.0
1096扫雷(构建两个数组,for循环遍历实现) 解题思路:注意事项:参考代码:#include#includeusingnamespacestd;intmain(){intm,n;intk=1;//后面输出第几组数据用的while((cin>>m>>n)){if(m==0&&n==0)//跳出循环break;chars[100][100];//存地 题解列表 2024年05月31日 0 点赞 0 评论 591 浏览 评分:0.0
1098陶陶摘苹果(for循环遍历解决) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[15];//存苹果高度 int b;//存陶陶的高度 in…… 题解列表 2024年05月31日 0 点赞 0 评论 697 浏览 评分:0.0
1099校门外的树(数组解决) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int m;//马路长度 int n;//组数 cin >> m >>…… 题解列表 2024年05月31日 0 点赞 0 评论 757 浏览 评分:0.0
1242: 矩阵转置 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;const int N=1e3+5;typedef long long ll;ll…… 题解列表 2024年06月01日 0 点赞 0 评论 562 浏览 评分:0.0
1100采药(dp记忆化搜索) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>#include<cstring>using namespace std;const int M…… 题解列表 2024年06月01日 0 点赞 0 评论 714 浏览 评分:0.0
蓝桥杯算法训练VIP-整数平均值 解题思路:1.封装成函数,传入数据量n即可,函数返回平均值,2.函数通过循环获取输入,并累加求和,3.计算平均值,函数结果回传注意事项:此题要求得到平均值,但结果是一个整数,如例子给出的34002的平均值为1,所以average是整型参考代码:#includeintconculate 题解列表 2024年06月01日 1 点赞 0 评论 593 浏览 评分:0.0