Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
spec ^ lit <= broken solution in Clear category for Seven Segment by veky
offs = 'g afged fc fe aed be b fged e'.split(' ')
specs = {frozenset().union(*offs).difference(off) for off in offs}
def seven_segment(*sss):
def ndigits(case):
lit, broken = ({s.casefold() for s in ss if case(s)} for ss in sss)
return sum(spec ^ lit <= broken for spec in specs)
return ndigits(str.isupper) * ndigits(str.islower)
Aug. 4, 2019