- 博客(1)
- 问答 (1)
- 收藏
- 关注
原创 java小算法—球从100米高度自由落下
题目:一球从100米高度自由落下,每次落地后反跳回原高度的一半;再落下,求它在 第10次落地时,共经过多少米?第10次反弹多高? 输出结果:299.609375 package game; public class Ball { int high; int n; double distance=0; public Ball(int high, int n) { this.high = high; this.n = n; } public double statLength() {
2021-04-13 23:58:03
264
空空如也
python中 if not x 和if x<0有什么区别(x的值为整数)
2021-06-09
TA创建的收藏夹 TA关注的收藏夹
TA关注的人