题解
2025-07-04 12:58:25
发布于:广东
21阅读
0回复
0点赞
其实正整数补码就是它本身,所以我们可以这样实现。
#include <iostream>
#include <cstdio>
#include <bitset>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int n;
cin >> n;
cout << bitset <32> (n);
return 0;
}
这里空空如也
有帮助,赞一个