Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
40206 | 奚晨瑞 | 角谷猜想 | C++ | Accepted | 1 MS | 244 KB | 265 | 2024-02-08 13:42:14 |
#include<iostream> using namespace std; int main() { int n; cin>>n; while(n!=1){ cout<<n; if(n%2!=0){ cout<<"*3+1="; n*=3; n++; cout<<n; } else{ n/=2; cout<<"/2="<<n; } cout<<endl; } cout<<"End"; return 0; }