题解
2025-07-13 19:18:47
发布于:广东
13阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s;
while (n > 0) {
s += to_string(n % 2);
n /= 2;
}
reverse(s.begin(), s.end());
cout << s << endl;
return 0;
}
这里空空如也
有帮助,赞一个