酷代码 AI
菜单
服务商

yongpython 回答篇幅:简单明了

第一题:数字分离 ```cpp #include <iostream> using namespace std; int main() { long long x; cin >> x; if (x == 0) { cout << 0; return 0; } while (x != 0) { cout << x % 10 << " "; x /= 10; } return 0; } ``` 第二题:冰雹猜想 ```python n = int(input()) while n != 1: if n % 2 == 0: print(f"{n}/2={n//2}") n //= 2 else: print(f"{n}*3+1={n*3+1}") n = n * 3 + 1 ``` [2025-12-17 18:02:16 | AI问答 | 173点数解答]

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