eNeRGy90

Untitled

Dec 2nd, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. first = int(input())
  2. second = int(input())
  3. max_pw = int(input())
  4.  
  5. counter = 0
  6. A = 35
  7. B = 64
  8. is_enough = False
  9. for x in range(1, first+1):
  10.      for y in range(1, second+1):
  11.          print(f"{chr(A)}{chr(B)}{x}{y}{chr(B)}{chr(A)}", end="|")
  12.          counter += 1
  13.          A += 1
  14.          if A > 55:
  15.              A = 35
  16.          B += 1
  17.          if B > 96:
  18.              B = 64
  19.          if counter >= max_pw:
  20.              is_enough = True
  21.              break
  22.      if is_enough:
  23.          break
Add Comment
Please, Sign In to add comment