_Daniel_ @ 2023-05-01 11:34:48
#include<iostream>
using namespace std;
int main()
{
int a;
cin>>a;
while(a!=1)
{
if(a°2==1)
{
cout<<a<<"*3+1="<<a*3+1<<endl;
a=a×3+1;
}
else
{
cout<<a<<" /2="<<a/2<<endl;
a/=2;
}
cout<<"End"<<endl;
return 0;
}
还是unaccepted 100分
by czrjx @ 2023-05-01 11:50:00
开 long long
by _Daniel_ @ 2023-05-01 11:52:09
@czrjx 感谢大佬