8 条题解

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

    信息

    ID
    2293
    时间
    1000ms
    内存
    256MiB
    难度
    1
    标签
    (无)
    递交数
    156
    已通过
    104
    上传者