Advertisement
Josif_tepe

Untitled

Feb 13th, 2024
1,100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <queue>
  3. #include <fstream>
  4. #include <vector>
  5. #include <cstring>
  6. //#include <bits/stdc++.h>
  7. using namespace std;
  8.  
  9. int main() {
  10.     int p = 247;
  11.    
  12.     for(int bit = 30; bit >= 0; bit--) {
  13.         if(p & (1 << bit)) {
  14.             cout << 1;
  15.         }
  16.         else {
  17.             cout << 0;
  18.         }
  19.     }
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement