题解列表
Ikaros-1808:[编程基础]输入输出练习之精度控制1 Python解决
摘要:解题思路:使用float、round函数即可参考代码:# number保存输入的浮点数值number = float(input())# 用round来保留三位小数点print(round(numbe……
水仙花数判断-三种求解方法
摘要:参考代码:class Solution {
//题目描述
//打印出所有"水仙花数",所谓"水仙花数"是指一个三位数,其各位数字立方和等于该本身。 例如:153是一个水仙花数,因为153=1^3+……
题目 1052: [编程入门]链表合并
摘要:解题思路:注意事项:在线编程通过了,测试提交出错了,有hxd提点建议吗参考代码:n,m = map(int,input().split())l = []for i in range((n+m)): ……
[C++][基础算法讲解]简单理解动态规划
摘要:视频讲解:https://www.bilibili.com/video/BV1Lh411n7wi/参考代码:#include #include #include #include using name……
母牛的故事(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(……