Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define endl '\n'
- #define sz(x) int(x.size())
- #define all(x) x.begin(), x.end()
- int main() {
- ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
- int n;
- while (scanf("%d", &n), n) {
- int a[2]{};
- for (int i = 0, idx = 0; i < 32; i++) {
- if (n & (1 << i)) {
- a[idx++ % 2] |= (1 << i);
- }
- }
- cout << a[0] << " " << a[1] << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement