用户名或者密码错误
| 注册账号 | 忘记密码
<->

2437

duanzexi 2022-10-15 12:34:08

#include

using namespace std;

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