Advertisement
a53

erasebits

a53
Nov 30th, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. long long n;
  5. cin >> n;
  6. while (n > 0)
  7. cout << (n -= (n & -n)) << ' ';
  8. return 0;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement