Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int32_t main(){
- ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
- int n;
- int c; cin >> c >> n;
- int x = c >> n;
- if((x&1) != ((x>>1)&1)){
- if(x&1) cout << c + (1<<n) << '+';
- else cout << c - (1<<n) << '-';
- }else cout << c;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement