You are viewing a single comment's thread. Return to all 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())
Seems like cookies are disabled on this browser, please enable them to open this website
Jim and the Jokes
You are viewing a single comment's thread. Return to all comments →
Yet another one-liner: