1 条题解

  • 2
    @ 2023-10-21 11:50:29

    #include using namespace std; int main(){ int n; cin >> n; while(n!=1){ if(n%2==1){ cout << n <<"3+1=" << n3+1 << endl; n = n*3+1; }else{ cout << n << "/2=" << n/2 << endl; n /= 2; } } cout << "End"; return 0; }

    • 1

    信息

    ID
    107
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    递交数
    32
    已通过
    10
    上传者