Ответ:
import itertools
N = int(input())
for i in itertools.product('MW', repeat=N):
men = i.count('M')
women = i.count('W')
print(f'{men} мальчиков, {women} девочек')
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
import itertools
N = int(input())
for i in itertools.product('MW', repeat=N):
men = i.count('M')
women = i.count('W')
print(f'{men} мальчиков, {women} девочек')