Advertisement
reverser1

Untitled

Jun 23rd, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.28 KB | None | 0 0
  1. #pragma GCC optimize("O3", "unroll-loops")
  2.  
  3. #include <bits/stdc++.h>
  4.  
  5. using namespace std;
  6.  
  7. const int inf = 1 << 30 - 1;
  8. const long long MOD = 1000000007;
  9.  
  10. typedef long long ll;
  11. typedef long double ld;
  12. typedef vector<int> vi;
  13. typedef vector<ll> vll;
  14. typedef pair<int, int> ii;
  15. typedef vector<ii> vii;
  16. typedef vector<vi> vvi;
  17. typedef vector<bool> vb;
  18.  
  19. #define FAST ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
  20. #define all(a) a.begin(), a.end()
  21. #define pb push_back
  22. #define files(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout)
  23. #define ppb pop_back
  24. #define ppf pop_front
  25. #define fs first
  26. #define sd second
  27. #define eb emplace_back
  28.  
  29. template<class T> inline void sort(T &a) { sort(all(a)); }
  30. template<class T> inline T sorted(T a) { sort(a); return a; }
  31. template<class T> inline istream& operator>>(istream& str, vector<T> &a) { for (auto &i : a) str >> i; return str; }
  32.  
  33. void solve() {
  34.     int n;
  35.     cin >> n;
  36.     for (int i = 7; i >= 0; --i) {
  37.         cout << ((n >> i) & 1);
  38.     }
  39. }
  40.  
  41. signed main() {
  42.     #ifndef ONLINE_JUDGE
  43.         freopen("input.txt", "r", stdin);
  44.         freopen("output.txt", "w", stdout);
  45.     #endif
  46.     FAST;
  47.     int q = 1;
  48.     // cin >> q;
  49.     while (q--) {
  50.         solve();
  51.     }
  52.     return 0;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement