Run ID:69638

提交时间:2024-04-06 11:19:22

#include<bits/stdc++.h> using namespace std; int main(){ int n,sh=1,i=0,s[32]={0}; cin>>n; while(n!=0){ sh=n/2; s[i]=n%2; n=sh; i++; } for(int j=i-1;j>=0;j--){ cout<<s[j]; } return 0; }