酷代码 AI
菜单
服务商

题目描述 试求满足下述立方和不等式的 m 的最大整数解 。i^3+2^3+3^3+....+m^3<=n 输入 输入 n(1≤n≤10^5) 的值。 输出 输出最大的 m。 样例输入 复制 50 样例输出 复制 3 回答篇幅:简单明了

第一题:游泳步数 ```python x = float(input()) distance = 0 step = 2 count = 0 while distance < x: distance += step step *= 0.98 count += 1 print(count) ``` 第二题:立方和不等式 ```python n = int(input()) total = 0 m = 0 while total + (m + 1) 3 <= n: m += 1 total += m 3 print(m) ``` [2025-12-17 18:04:24 | AI问答 | 118点数解答]

相关提问
发财导航,免费问AI
实用工具查看更多