题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#

求小球落地5次后所经历的路程和第5次反弹的高度

http://www.nowcoder.com/practice/2f6f9339d151410583459847ecc98446

const height = parseInt(readline());

let total = height;
for (let i=1; i<=4; i++) {
    total += height/(2**i) * 2;
}
print(total);
const height5 = height / (2**5);
print(height5);


全部评论
两个星号※啥意思?
点赞
送花
回复 分享
发布于 2022-01-11 01:52

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务