Run ID:101802

提交时间:2024-12-18 21:19:18

#include <iostream> #include <iomanip> // 用于设置输出精度 using namespace std; int main() { double initialHeight = 100.0; // 初始高度100米 int bounces = 10; // 落地次数 double height = initialHeight / pow(2, bounces - 1); // 计算第10次落地后的反弹高度 cout << fixed << setprecision(6) << height << endl; // 输出结果,保留6位小数 return 0; }