Ikaros-1808:[编程基础]输入输出练习之精度控制1 Python解决 摘要:解题思路:使用float、round函数即可参考代码:# number保存输入的浮点数值number = float(input())# 用round来保留三位小数点print(round(numbe…… 题解列表 2021年09月18日 0 点赞 0 评论 358 浏览 评分:2.0
水仙花数判断-三种求解方法 摘要:参考代码:class Solution { //题目描述 //打印出所有"水仙花数",所谓"水仙花数"是指一个三位数,其各位数字立方和等于该本身。 例如:153是一个水仙花数,因为153=1^3+…… 题解列表 2021年09月27日 0 点赞 0 评论 511 浏览 评分:2.0
题目 1052: [编程入门]链表合并 摘要:解题思路:注意事项:在线编程通过了,测试提交出错了,有hxd提点建议吗参考代码:n,m = map(int,input().split())l = []for i in range((n+m)): …… 题解列表 2021年10月10日 0 点赞 1 评论 269 浏览 评分:2.0
[C++][基础算法讲解]简单理解动态规划 摘要:视频讲解:https://www.bilibili.com/video/BV1Lh411n7wi/参考代码:#include #include #include #include using name…… 题解列表 2021年10月23日 0 点赞 0 评论 420 浏览 评分:2.0
母牛的故事(Python代码) 摘要:解题思路:运用递归的方法的话会因为效率低超时,所以用列表先直接将题目要求的限制年数的每一年的对应值直接放入列表中,每次输入年份n则将n对应列表里的数值输出即可。参考代码:a=[int(i) for i…… 题解列表 2021年10月29日 0 点赞 0 评论 387 浏览 评分:2.0
数字逆序输出简便方法 摘要:解题思路:注意事项:参考代码:#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…… 题解列表 2021年11月04日 0 点赞 0 评论 195 浏览 评分:2.0
二级c语言-分段函数题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float x,y; scanf("%f",&x); if(x<1) y=x; …… 题解列表 2021年11月07日 0 点赞 0 评论 245 浏览 评分:2.0
二级C语言-分段函数题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ float x,y; scanf("%f",&x); if(…… 题解列表 2021年11月07日 0 点赞 0 评论 322 浏览 评分:2.0
成绩等级转换Switch语句练习题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x,y; while (scanf("%d",&x)!=EOF){ y=x/10;…… 题解列表 2021年11月07日 0 点赞 0 评论 656 浏览 评分:2.0
分段计算题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x,y; scanf("%d",&x); if(x<3) y=2*x; else if(x<20) y…… 题解列表 2021年11月07日 0 点赞 0 评论 320 浏览 评分:2.0