Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. s = int(input())
  2. string = ""
  3. for i in range(1, 32 + 1):
  4. string += '1' if i <= s else '0'
  5. if i % 8 == 0 and i != 1:
  6. print(int(string, 2), end=' ')
  7. string = ""
  8.  
  9. #output
  10. #24
  11. #255 255 255 0
  12. #
  13. #10
  14. #255 192 0 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement