2 条题解

  • 1
    @ 2024-11-24 14:47:57
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	stack<int> st;
    	int n;
    	cin>>n;
    	while(n){
    		st.push(n%2);
    		n/=2;
    	}
    	while(!st.empty()){
    		cout<<st.top();
    		st.pop();
    	}
    	return 0;
    }
    

    信息

    ID
    269
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    递交数
    22
    已通过
    20
    上传者