题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#
求小球落地5次后所经历的路程和第5次反弹的高度
http://www.nowcoder.com/practice/2f6f9339d151410583459847ecc98446
while True: try: h = int(input()) h_total = sum([h*2/(2**i) for i in range(5)])-h h_five = h/(2**5) print(round(h_total, 6)) print(round(h_five,6)) except: break