文章
81
粉丝
2
获赞
494
访问
9.5k
#include <iostream> using namespace std; int main(){ int n; while(cin >> n){ if(n==0){ cout << 0 << endl; continue; } string s=""; while(n>0){ s = char(n%2 + '0') + s; n /=2; } cout << s << endl; } return 0; }
登录后发布评论
暂无评论,来抢沙发