文章
10
粉丝
17
获赞
0
访问
3.9k
#include<bits/stdc++.h>
using namespace std;
void f(unsigned int x){
char y[1024] = {0};
int i = 0;
while(x){
y[i++] = x % 2 + '0';
x = x / 2;
}
for (int j = i - 1; j >= 0; j--) {
printf("%c", y[j]);
}
printf("\n");
}
int main(){
unsigned int x;
while(scanf("%u", &x) != EOF){
f(x);
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发