Advertisement
eNeRGy90

Untitled

Dec 2nd, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.87 KB | None | 0 0
  1. a = int(input())
  2. b = int(input())
  3. max_passes = int(input())
  4.  
  5. is_greater_than_AB = False
  6. is_greater_than_counter = False
  7.  
  8. passes_counter = 0
  9. A = 35
  10. B = 64
  11. #for A in range(35, 55 + 1):
  12. #    if is_greater_than_AB or is_greater_than_counter:
  13. #        break
  14. #    for B in range(64, 96 + 1):
  15. #        if is_greater_than_AB or is_greater_than_counter:
  16. #            break
  17. for x in range(1, a + 1):
  18.     if is_greater_than_AB or is_greater_than_counter:
  19.          break
  20.     for y in range(1, b + 1):
  21.  
  22.       passes_counter += 1
  23.       print(f"{chr(A)}{chr(B)}{x}{y}{chr(B)}{chr(A)}|", end="")
  24.       if passes_counter > (a + b):
  25.           is_greater_than_AB = True
  26.           break
  27.       elif passes_counter >= max_passes:
  28.         is_greater_than_counter = True
  29.         break
  30.       A += 1
  31.       B += 1
  32.  
  33.       if A > 55:
  34.           A = 35
  35.  
  36.       if B > 96:
  37.           B = 64
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement