homoteam_ikun @ 2023-07-02 23:27:12
#include<iostream>
using namespace std;
int main(){
long long int n;
cin>>n;
for(int i=n;i!=1;){
if(i%2!=0){
cout<<i<<"*3+1="<<i*3+1<<endl;
i=i*3+1;
}else{
cout<<i<<"/2="<<i/2<<endl;
i=i/2;
}
}
cout<<"end";
return 0;
}
by wste @ 2023-07-03 00:31:53
"end" --> "End" 还有循环的i要是long long