使用fgets输入字符串然后实现反转 摘要:解题思路:可以定义一个数组循环输入,也可以定义一个数组然后使用字符串输入格式 "%s" 输入,还可以使用gets输入(gets不安全,尽量不用),这里使用fgets输入,fgets函数具有三个参数,第…… 题解列表 2024年07月22日 2 点赞 0 评论 512 浏览 评分:10.0
C语言求偶数和 摘要:解题思路:循环和条件判断语句的使用注意事项:写了两种,一种就是不需要输入整数个数n(输入以回车结束),另一种是需要输入整数个数n(就是本题)参考代码:第一种:#include<stdio.h>int …… 题解列表 2024年07月26日 3 点赞 0 评论 962 浏览 评分:10.0
巧用动态规划 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,index=0,i,l[1000]; l[0]=0; char ch='0'; fo…… 题解列表 2024年07月27日 2 点赞 0 评论 776 浏览 评分:10.0
[编程入门]第一个HelloWorld程序(c++) 摘要:解题思路:直接输出"**************************\nHello World!\n**************************"就好了注意事项:"\n"是换行符号参考代码…… 题解列表 2024年07月29日 2 点赞 0 评论 604 浏览 评分:10.0
2981: 二进制分类 摘要:```cpp #include using namespace std; int A,B; bool turn(int x) { int a=0,b=0; while(x!=0) …… 题解列表 2024年07月29日 1 点赞 0 评论 278 浏览 评分:10.0
8行:帅破天际 摘要:解题思路:注意事项:参考代码:wlb=[]for i in range(5): row=input() wlb.append(row)n,m=map(int,input().split()…… 题解列表 2024年07月30日 3 点赞 1 评论 816 浏览 评分:10.0
1023: [编程入门]选择排序 摘要:```cpp #include using namespace std; int k; int xz(int a[10]){ for(int i=0;ia[i]; xz(a); f…… 题解列表 2024年07月30日 0 点赞 0 评论 554 浏览 评分:10.0
有大佬解释一下为什么过不了所有点吗 摘要:``` n=int(input()) l=list(map(int,input().split())) p=0 while l!=[]: c=min(l) p+=int(l…… 题解列表 2024年08月01日 0 点赞 1 评论 664 浏览 评分:10.0
8行:万花丛中过,片叶不沾身 摘要:```` li=[] n=int(input()) l=list(map(int,input().split())) for s in l: if s%2==1: …… 题解列表 2024年08月01日 0 点赞 0 评论 548 浏览 评分:10.0
链表解决,简单易懂(c语言) 摘要:```c #include #include #include #include // 定义链表节点结构 typedef struct node { char arr…… 题解列表 2024年08月02日 1 点赞 0 评论 590 浏览 评分:10.0