题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#
求小球落地5次后所经历的路程和第5次反弹的高度
https://www.nowcoder.com/practice/2f6f9339d151410583459847ecc98446
h = int(input()) sum_h = ((h - h * (0.5**5))*4) - h h_5 = (0.5**5) * h print(sum_h, end='\n') print(h_5)
求小球落地5次后所经历的路程和第5次反弹的高度
https://www.nowcoder.com/practice/2f6f9339d151410583459847ecc98446
h = int(input()) sum_h = ((h - h * (0.5**5))*4) - h h_5 = (0.5**5) * h print(sum_h, end='\n') print(h_5)
相关推荐