Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
37651 C++|刘一阳 角谷猜想 C++ 通过 0 MS 256 KB 250 2024-01-22 15:32:11

Tests(1/1):


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


测评信息: