yang1812 @ 2023-11-11 19:00:19
by LiAuPb @ 2023-11-11 19:06:00
@yang1812 代码在哪里?
by yang1812 @ 2023-11-11 21:21:08
#include<bits/stdc++.h>
using namespace std;
long long n;
int main() {
scanf("%lld",&n);
while(n != 1){
if(n % 2 != 0){
printf("%d*3+1=%d\n",n,n * 3 + 1);
n = n * 3 + 1;
}else{
printf("%d/2=%d\n",n,n / 2);
n = n / 2;
}
}
printf("End");
}
by yang1812 @ 2023-11-12 09:00:03
by penguin_is_cool @ 2023-11-12 11:07:15
@yang1812 输出都改成%lld就过了