题解列表

筛选

题目 1052: [编程入门]链表合并

摘要:解题思路:注意事项:在线编程通过了,测试提交出错了,有hxd提点建议吗参考代码:n,m = map(int,input().split())l = []for i in range((n+m)):  ……

母牛的故事(Python代码)

摘要:解题思路:运用递归的方法的话会因为效率低超时,所以用列表先直接将题目要求的限制年数的每一年的对应值直接放入列表中,每次输入年份n则将n对应列表里的数值输出即可。参考代码:a=[int(i) for i……

数字逆序输出简便方法

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){   int a,b,c,d,e,f,g,h,i,j;    scanf("%d%d%d%d%d%d%d%d%d……

二级c语言-分段函数题解

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){     float  x,y;  scanf("%f",&x);     if(x<1)     y=x;   ……

二级C语言-分段函数题解

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){     float  x,y;  scanf("%f",&x);     if(……

分段计算题解

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x,y; scanf("%d",&x);  if(x<3) y=2*x; else if(x<20) y……

考试评级 Switch 语句

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x,y; scanf("%d",&x); y=x/10;  switch (y){ case 10: ……

边长判断有手就行

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,max,min,m; scanf("%d%d%d",&a,&b,&c); max=a>b?a……