1 条题解

  • 0
    @ 2025-1-27 10:38:20
    ```#include<bits/stdc++.h> 
    using namespace std;
    int s[1010];
    int main(){
    	int x,q=0;
    	cin>>x;
    	while (x>1){
    		s[q]=x
    		if (x%2==0){
    			x/=2;
    		}
    		else{
    			x=x*3+1;
    		}
    	}
    	cout<<s;
    ```	return 0;
    }
    • 1

    信息

    ID
    2011
    时间
    1000ms
    内存
    125MiB
    难度
    6
    标签
    (无)
    递交数
    82
    已通过
    23
    上传者