题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#
求小球落地5次后所经历的路程和第5次反弹的高度
http://www.nowcoder.com/practice/2f6f9339d151410583459847ecc98446
while True: try: num = int(input()) s = num for i in range(4): s+=num num/=2 print(s) print(num/2) except: break
求小球落地5次后所经历的路程和第5次反弹的高度
http://www.nowcoder.com/practice/2f6f9339d151410583459847ecc98446
while True: try: num = int(input()) s = num for i in range(4): s+=num num/=2 print(s) print(num/2) except: break
相关推荐