知道有枚举法,相减法,辗转相除法 摘要:1.枚举法 #include <stdio.h> int main() { int a,b,l=0,h; scanf("%d%d",&a,&b); for (int…… 题解列表 2023年08月23日 0 点赞 0 评论 108 浏览 评分:0.0
50分怎么办? 摘要:输入问题。每次输入学生的信息,用一个直接读入即可。scanf("%s %d %d", &students[i].name, &students[i].age, &students[i].marks);…… 题解列表 2023年08月24日 0 点赞 0 评论 210 浏览 评分:0.0
求素数,大于2的数看其是否能被2整除 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int su(int a){ if(a == 2) printf("prime"); if(a > 2…… 题解列表 2023年08月24日 0 点赞 0 评论 152 浏览 评分:0.0
等差数列(Java) 摘要:解题思路:注意事项:参考代码:方法一:import java.util.Scanner; public class Main { public static void main(Str…… 题解列表 2023年08月24日 0 点赞 0 评论 177 浏览 评分:0.0
1.输入n*n个数,记录大小输出位置2.使用数组 摘要:1.记录大小比较 #include<stdio.h> int main() { int i,n,m,qa,cam=0; scanf("%d",&i); for (i…… 题解列表 2023年08月24日 0 点赞 0 评论 102 浏览 评分:0.0
1011[编程入门]最大公约数与最小公倍数(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdbool.h>int main(){ int m,n; scanf("%d %d",&m,&n); …… 题解列表 2023年08月25日 0 点赞 0 评论 174 浏览 评分:0.0
3154: 蓝桥杯2023年第十四届省赛真题-子串简写 摘要:解题思路: 在本子上手写模拟一下就出来了。以c2为结尾,记录当前有多少个c2,存在dp数组内 以c1为开头,循环寻找c1,从c1到结尾的c2个数存在dp[i]内,相减就是c2个数,再留出k…… 题解列表 2023年08月26日 0 点赞 0 评论 404 浏览 评分:0.0
矩阵交换行 摘要:解题思路:注意事项:记得要a[m-1] a[n-1]啊! 因为数组下标从0开始!!!参考代码:#include<stdio.h>#include<string.h>int main(){ int…… 题解列表 2023年08月26日 0 点赞 0 评论 158 浏览 评分:0.0
辗转相除法 摘要:解题思路:注意事项:参考代码#include<stdio.h>int main(){ int a,b,r,s=0,temp=0; scanf("%d%d",&a,&b); if(a<b) { tem…… 题解列表 2023年08月26日 0 点赞 0 评论 148 浏览 评分:0.0
1755: 姓名排序 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std; //比较的规则int cmp(string a,st…… 题解列表 2023年08月27日 0 点赞 0 评论 173 浏览 评分:0.0