1 条题解

  • 1
    @ 2026-6-27 16:25:54

    #include using namespace std;

    int main() { long long n; int c = 0; cin >> n; while (n != 1) { if (n % 2 == 0) n /= 2; else n = n * 3 + 1; c++; } cout << c << endl; return 0; }

    • 1

    信息

    ID
    30231
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    递交数
    17
    已通过
    10
    上传者