fork download
  1. /*
  2. * @Author: hungeazy
  3. * @Date: 2026-03-04 23:24:15
  4. * @Last Modified by: hungeazy
  5. * @Last Modified time: 2026-03-18 23:02:32
  6. */
  7. #include <bits/stdc++.h>
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12. ios_base::sync_with_stdio(false);
  13. cin.tie(NULL); cout.tie(NULL);
  14. int n;
  15. cin >> n;
  16. string st = "";
  17. while (n != 0)
  18. {
  19. st += char(n%2+'0');
  20. n /= 2;
  21. }
  22. reverse(st.begin(),st.end());
  23. cout << st;
  24. }
Success #stdin #stdout 0.01s 5308KB
stdin
Standard input is empty
stdout
101010101011010