2812: 球弹跳高度的计算 摘要:解题思路:利用列表生成式和切片高效地完成了计算!用列表生成式计算前10次反弹高度:height1 = [height0 * (0.5 ** i) for i in range(10)]每次落地后反跳,…… 题解列表 2025年07月16日 0 点赞 0 评论 31 浏览 评分:0.0
C++简单解法 摘要:解题思路:重要的是要知道该从什么时候开始循环计算,是从松手就进入循环计算,还是第一次落地后才开始循环计算,只要理解了这个,题目思路就显而易见了。注意事项:参考代码:#include<iostre…… 题解列表 2025年04月06日 0 点赞 0 评论 115 浏览 评分:0.0
注意循环的次数,手动拆解下落地的精确距离怎么表示 摘要:注意事项:i循环的次数参考代码:#include<iostream> #include<cmath> using namespace std; int main() { int h;…… 题解列表 2024年12月05日 0 点赞 0 评论 183 浏览 评分: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 评论 250 浏览 评分:0.0
没有太多解释的代码 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main ( ){ double h ,h1 ,h2 ,h3 ; doub…… 题解列表 2024年11月08日 0 点赞 0 评论 206 浏览 评分:0.0
球弹跳高度的计算 摘要:解题思路:注意事项:参考代码:h = float(input())s = hfor i in range(9): h = h/2 s += h*2print(f"{s:g}")print(…… 题解列表 2024年07月30日 0 点赞 0 评论 425 浏览 评分: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 评论 203 浏览 评分:0.0
2812 (C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ double a,b,i,c=0; scanf("%lf", &a); b=a; for…… 题解列表 2024年03月18日 0 点赞 0 评论 164 浏览 评分:0.0
2812: 球弹跳高度的计算 摘要:参考代码:h = int(input()) sum = h for i in range(10): h /= 2 if i != 9: sum += h  题解列表 2024年03月17日 0 点赞 0 评论 640 浏览 评分:0.0
2812: 球弹跳高度的计算 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { double meter,sum=0,s=0; …… 题解列表 2024年01月02日 0 点赞 0 评论 217 浏览 评分:0.0