Iterables and Iterators

  • + 0 comments

    from itertools import combinations n=int(input()) y=input().split() f=int(input()) c=list(combinations(y,f)) d=0 for i in c: if "a" in i: d+=1 print(d/len(c))