Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count_man = int(input())
- count_women = int(input())
- max_tables = int(input())
- list_couples = []
- check_tables = False
- # Комбинациите са с максимален размер, брой маси
- for man in range(1, count_man + 1):
- for woman in range(1, count_women + 1):
- list_couples.append(str(man) + ' <-> ' + str(woman))
- if len(list_couples) == max_tables:
- check_tables = True
- break
- if check_tables:
- break
- for couples in list_couples:
- print(f"({couples})", end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement