Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
for in for solution in Clear category for Count Consecutive Summers by MrPod
def count_consecutive_summers(n):
return 1 + sum(sum([*range(j - i, j)]) == n for i in range(2, n // 2 + 1) for j in range(n // 2 + 4 - i, i, -1))
Sept. 9, 2019