Iterables and Iterators

  • + 2 comments

    except 2 test cases all pass can any body help me with this code from itertools import combinations as p n = int(input()) s = sorted(input().split()) m = int(input()) a = list(p(s,m)) count = 0 for i in a : if s[1] in i or s[0] in i: count += 1 print(count/len(a))