96 条题解
-
-112234洪子昊 (12234洪子昊) LV 8 @ 2021-12-26 20:24:19
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:18@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:16@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:14@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:12@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:10@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:08@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:06@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:04@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:03@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:24:01@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:23:59@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:23:57@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:23:55@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:23:53@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:23:51@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:23:46@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:23:44@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:23:42@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
} -
-12021-12-26 20:23:40@
#include<iostream>
using namespace std;
int main()
{
int N;
cin>>N;
if(N==1)
cout<<"End";
else
while(N>1)
{
if(N%2==0)
{
cout<<N<<'/'<<2<<'='<<N/2<<endl;
N=N/2;
}
else
if(N%2!=0)
{
cout<<N<<'*'<<3<<'+'<<1<<'='<<N*3+1<<endl;
N=N*3+1;
}
}
cout<<"End";
}
信息
- ID
- 1748
- 难度
- 2
- 分类
- (无)
- 标签
- 递交数
- 80
- 已通过
- 44
- 通过率
- 55%
- 被复制
- 2
- 上传者