2025/7/31刷题记录 摘要:解题思路:注意事项:%g占位符可以将结果小数点第一个0(包括这个0)以后所以的数字都省略参考代码:#include<stdio.h>int main(){ int…… 题解列表 2025年07月31日 0 点赞 0 评论 21 浏览 评分:0.0
2812: 球弹跳高度的计算 摘要:解题思路:利用列表生成式和切片高效地完成了计算!用列表生成式计算前10次反弹高度:height1 = [height0 * (0.5 ** i) for i in range(10)]每次落地后反跳,…… 题解列表 2025年07月16日 0 点赞 0 评论 145 浏览 评分:0.0
C++简单解法 摘要:解题思路:重要的是要知道该从什么时候开始循环计算,是从松手就进入循环计算,还是第一次落地后才开始循环计算,只要理解了这个,题目思路就显而易见了。注意事项:参考代码:#include<iostre…… 题解列表 2025年04月06日 0 点赞 0 评论 125 浏览 评分:0.0
注意循环的次数,手动拆解下落地的精确距离怎么表示 摘要:注意事项:i循环的次数参考代码:#include<iostream> #include<cmath> using namespace std; int main() { int h;…… 题解列表 2024年12月05日 0 点赞 0 评论 196 浏览 评分:0.0
利用数学思维和for循环来解答,清晰明了 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,h; double S=0,s,H; scanf("%d",&h); H=h…… 题解列表 2024年11月26日 1 点赞 0 评论 271 浏览 评分:0.0
没有太多解释的代码 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main ( ){ double h ,h1 ,h2 ,h3 ; doub…… 题解列表 2024年11月08日 0 点赞 0 评论 214 浏览 评分:0.0
球弹跳高度的计算(小白专用,不要技巧,好理解) 摘要:解题思路:按照小球运动状态;注意事项:虽然路程需要*2;但是参考代码通过一次循环嵌套实现;参考代码:#include<math.h>int main(){ int i = 1; double m=0,…… 题解列表 2024年10月28日 0 点赞 0 评论 317 浏览 评分:9.9
球弹跳高度的计算 摘要:解题思路:注意事项:参考代码:h = float(input())s = hfor i in range(9): h = h/2 s += h*2print(f"{s:g}")print(…… 题解列表 2024年07月30日 0 点赞 0 评论 432 浏览 评分:0.0
编写题解 2812: 球弹跳高度的计算 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int h,i; scanf("%d",&h); double h1=h,s=0.0; s=2.0*h1; fo…… 题解列表 2024年07月18日 0 点赞 0 评论 206 浏览 评分:0.0
球弹跳高度 摘要:解题思路:累加高度注意事项:参考代码:h=int(input())m=hfor i in range(10): m=m+h h=h/2print('%g'%m)print(…… 题解列表 2024年07月09日 0 点赞 0 评论 269 浏览 评分:2.0