Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
2-liner: easy solution in Clear category for Count Consecutive Summers by przemyslaw.daniel
count_consecutive_summers = lambda n: sum(b*(b+1)-a*(a+1) == 2*n
for a in range(n) for b in range(a+1, n+1))
Dec. 7, 2018
Comments: