一维数组--2.陶陶摘苹果 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a[10],n,count=0; for(int i=0;i<10;i++){ …… 题解列表 2023年03月24日 0 点赞 0 评论 328 浏览 评分:0.0
一维数组--3.数组逆序重放 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int n,a[100]; scanf("%d",&n); //输入; for(int …… 题解列表 2023年03月24日 0 点赞 0 评论 1126 浏览 评分:9.9
一维数组--4.年龄与疾病 摘要:注意事项: 记得把b,c,d,e初始化为0,不然结果会出现错误;参考代码:#include<stdio.h> int main() { int n,a[100]; int b=0,c=0,…… 题解列表 2023年03月24日 0 点赞 0 评论 618 浏览 评分:8.2
字符串--1.统计数字字符个数 摘要:解题思路: 注意事项:参考代码:#include<stdio.h> #include<string.h> int main() { char str[255]; int count=0,…… 题解列表 2023年03月24日 0 点赞 0 评论 491 浏览 评分:0.0
冒泡法和遍历法 摘要:解题思路:注意事项:参考代码:方法一:冒泡法#include<stdio.h>int main(){ int i,j,n,a[10],temp; n=3; for(i=0;i<n;i++){ …… 题解列表 2023年03月24日 0 点赞 0 评论 328 浏览 评分:0.0
蓝桥杯算法训练1909-拿糖果-JAVA题解(包教包会,带图详细解析动态规划) 摘要:解题思路: 我们先分析题目,有一堆糖果,每次可以拿走x(不大于根号下此时糖果数,且是根号下此时糖果数的质因数)个,拿走x个后,原来的糖果会减少2x,然后重复这个步骤。 为了更好的理解问题,下面…… 题解列表 2023年03月24日 0 点赞 0 评论 511 浏览 评分:0.0
字符串--2.找第一个只出现一次的字符 摘要:解题思路:注意事项:遇到求字符串中类似于字符个数这种题,想到先用strlen(str),后用双循环挨个进行比较;参考代码:#include<stdio.h> #include<string.h> …… 题解列表 2023年03月24日 0 点赞 0 评论 357 浏览 评分:0.0
字符串--3.基因相关性 摘要:解题思路: 得用scanf("%s",str)输入字符串,用gets(str)会结果错误,原因可能是复制输入字符的时候有空格;区别:scanf("%s",str)---遇到空格就停止; …… 题解列表 2023年03月24日 0 点赞 0 评论 442 浏览 评分:0.0
编写题解 1000: [竞赛入门]简单的a+b 摘要:#include<stdio.h> /* 关于~的作用解析: 1、在Windows下,用户按下CTRL+Z(会看到一个^Z字符),会停止输入流,scanf会返回-1。 2、-1的补码为11…… 题解列表 2023年03月24日 0 点赞 0 评论 361 浏览 评分:9.9
字符串--4.石头剪刀布 摘要:解题思路: 用空格分离字符,想到用scanf("%s %s",a,b);注意事项:参考代码:#include<stdio.h> #include<string.h> int main() { …… 题解列表 2023年03月24日 2 点赞 1 评论 493 浏览 评分:9.9