???TLE???
查看原帖
???TLE???
1472118
Minions_love_dameile楼主2024/12/28 11:08

怎么回事???
task2task2全TLE

#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
typedef long long ll;
const int INF = 1061109567;
void YMT(){
	int n;
	cin >> n;
	while (n!=1){
		if (n % 2 == 1){
			cout << n << "*3+1=" << n*3+1<<endl;
			n = n*3+1;
		}
		else{
			cout << n << "/2=" << n/2<<endl;
			n = n/2;
		}
	}
	cout<<"End"; 
}
int main(){
	int T=1; //cin >> T;
	while(T--) YMT();
	return 0;
}

2024/12/28 11:08
加载中...