Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
161534 王垚植 角谷猜想 C++ Accepted 8 MS 272 KB 280 2026-10-06 10:22:30

Tests(5/5):


Code:

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