Loading... ```c #include <stdio.h> #include <math.h>//fabs #include <stdlib.h>//abs int main() { int i; scanf("%d", &i); do { if (i % 2 == 0) i = i / 2; else i = i * 3 + 1; } while (i != 1); printf("%d", i); return 0; } ``` 最后修改:2023 年 09 月 25 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏噢~