题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#
求小球落地5次后所经历的路程和第5次反弹的高度
https://www.nowcoder.com/practice/2f6f9339d151410583459847ecc98446
h = int(input())
hh = 0 #第几次落地的反弹高度
s = 0 #第几次落地经过多少米
for i in range(1,6):
if i == 1:
hh = h/2
s = h
else:
s = s+hh*2
hh = hh/2
print(s)
print(hh)