Advertisement
veronikaaa86

06. Barcode Generator

Feb 19th, 2022
577
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. start = int(input())
  2. end = int(input())
  3.  
  4. #2345
  5. s1 = start // 1000 % 10
  6. s2 = start // 100 % 10
  7. s3 = start // 10 % 10
  8. s4 = start % 10
  9.  
  10. #6789
  11. e1 = end // 1000 % 10
  12. e2 = end // 100 % 10
  13. e3 = end // 10 % 10
  14. e4 = end % 10
  15.  
  16. for i in range(s1, e1 + 1):
  17. if i % 2 == 0:
  18. continue
  19. for j in range(s2, e2 + 1):
  20. if j % 2 == 0:
  21. continue
  22. for k in range(s3, e3 + 1):
  23. if k % 2 == 0:
  24. continue
  25. for l in range(s4, e4 + 1):
  26. if l % 2 == 0:
  27. continue
  28.  
  29. print(f"{i}{j}{k}{l}", end= " ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement