#include<bits/stdc++.h> using namespace std; int main() { int x; cin>>x; if(x<0) { x=-x; cout<<1; } else { cout<<0; } for(int i=30;i>=0;i--) { if(x>>i&1) { cout<<1; } else { cout<<0; } } return 0; }
#include<bits/stdc++.h> using namespace std; int main() { int x; cin>>x; if(x<0) { x=-x; cout<<1; } else { cout<<0; } bitset<32> a(x); for(int i=30;i>=0;i--) { cout<<a[i]; } return 0; }
Using your lizikid universal account