Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = int(input())
- y = int(input())
- max_combinations = int(input())
- total_combinations = 0
- is_true = False
- for a in range(35, 56):
- if is_true:
- break
- for b in range(64, 97):
- if is_true:
- break
- for c in range(1, x + 1):
- for d in range(1, y + 1):
- if total_combinations < max_combinations:
- print(f"{chr(a)}{chr(b)}{c}{d}{chr(b)}{chr(a)}", end="|")
- total_combinations += 1
- a += 1
- if a > 55:
- a = 35
- b += 1
- if b > 96:
- b = 64
- if c == x and d == y:
- is_true = True
- break
- else:
- is_true = True
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement