您当前的位置: 首页 > 

PAT (Basic Level) Practice (中文)题目集合

不牌不改 发布时间:2022-03-28 20:15:19 ,浏览量:4

1001 害死人不偿命的(3n+1)猜想 (15 分)
#include
using namespace std;

int n, ans;
int main()
{
	cin >> n;
	
	while (n != 1) {
		if (n & 1) n = 3 * n + 1;
		ans ++;
		n >>= 1;
	}
	cout  s;
		stu[s] = {name, id};
		minv = min (s, minv);
		maxv = max (s, maxv);
	}
	
	cout             
关注
打赏
1688896170
查看更多评论
0.3136s