Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
72700 sh25_zhuwy 角谷猜想 C++ 通过 0 MS 252 KB 327 2025-11-02 13:53:03

Tests(1/1):


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


测评信息: