有大佬解释一下为什么过不了所有点吗 ```n=int(input())l=list(map(int,input().split()))p=0whilel!=[]:c=min(l)p+=int(l.index(c))l.remove(c)print(p)```。。。。。。。。。。。 题解列表 2024年08月01日 0 点赞 1 评论 862 浏览 评分:10.0
8行:万花丛中过,片叶不沾身 ````li=[]n=int(input())l=list(map(int,input().split()))forsinl:ifs%2==1:li.append(s)li.sort()print(",".join(map(str,li)))```` 题解列表 2024年08月01日 0 点赞 0 评论 773 浏览 评分:10.0
链表解决,简单易懂(c语言) ```c#include#include#include#include//定义链表节点结构typedefstructnode{chararr[100];//存储字符串数据structnode*next;//指向下一个节点的指针}link;//函数声明voidshow(link*head);//输出链 题解列表 2024年08月02日 1 点赞 0 评论 777 浏览 评分:10.0
大数的阶乘C语言代码 解题思路:大数的阶乘很容易超出基本数据类型的范围造成数据溢出,所以需要定义一个数组来存储数据(数组可以存放无限大的数据)。阶乘的本质就是数的相乘,因此在计算大数的阶乘的时候可以通过模拟笔算的方式,将数拆分成每一位,然后让每一位依次与数相乘,进位的数与前一位相加后如果还需要进位则继续按照这个逻辑计算, 题解列表 2024年08月03日 5 点赞 0 评论 1132 浏览 评分:10.0
奇偶ASCII值判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { char ch; ch=getchar(); int num=ch; …… 题解列表 2024年08月04日 1 点赞 0 评论 720 浏览 评分:10.0
整数大小比较 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> int main() { int x,y; scanf("%d %d",&…… 题解列表 2024年08月04日 0 点赞 1 评论 997 浏览 评分:10.0
对于这个问题,直接用暴力算法,直接求解 摘要:参考代码:#include<stdio.h>int main(){ int a=0; int n[3]; for(int i=0;i<3;i++){ scanf("%d",&n[i]); } for…… 题解列表 2024年08月04日 6 点赞 1 评论 1849 浏览 评分:10.0
1066: 二级C语言-自定义函数 此题有坑(c语言代码) ```c#include#includedoublefact(intn){doublen1=1.0;for(inti=1;i 题解列表 2024年08月05日 1 点赞 1 评论 872 浏览 评分:10.0
1771: [编程入门]链表之节点删除(c语言代码) ```c#include#includetypedefstructnode{intid,socre;structnode*next;}student;student*create(intn){//尾插法建表student*head,*r,*s;head=malloc(sizeof(student)); 题解列表 2024年08月06日 1 点赞 0 评论 944 浏览 评分:10.0
1681: 数据结构-行编辑程序(c语言代码,包你懂的) 摘要:此题有两个点要注意,就是空格要不要管,还有多组数据的输入怎么处理 题目的输入是这样的: whil##ilr#e(s#*s) outcha@ putchar(*s=#++);这个输入前面是…… 题解列表 2024年08月07日 1 点赞 0 评论 747 浏览 评分:10.0