chenjun • 1年前
using namespace std; int main(){
int n; string s=""; cin>>n; while(n!=0){ s+=(char)((n%2)+'0'); n/=2; } reverse(s.begin(),s.end()); cout<<s; return 0;
}
评论: