We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d750126 commit ece99c9Copy full SHA for ece99c9
newcoder/HJ38.py
@@ -0,0 +1,17 @@
1
+'''
2
+Descripttion: 求小球落地5次后所经历的路程和第5次反弹的高度
3
+version: 1
4
+Author: Jason
5
+Date: 2020-11-20 14:02:19
6
+LastEditors: Jason
7
+LastEditTime: 2020-11-20 14:18:39
8
9
+altitude = int(input())
10
+distance = 0
11
+distance_rep = 0
12
+for _ in range(5):
13
+ distance += altitude + distance_rep
14
+ altitude = altitude / 2
15
+ distance_rep = altitude
16
+print(distance)
17
+print(distance_rep)
0 commit comments