• + 0 comments

    Yet another one-liner:

    from collections import Counter
    def solve(dates):
        return sum(math.comb(n,2) for _, n in Counter(int(str(day), base=month) for month, day in dates if all(month > int(digit) for digit in str(day))).most_common())