Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution solution in Clear category for Count Consecutive Summers by Matvey127
def count_consecutive_summers(num):
ways = 0
for i in range(1, num + 1):
s = num
while s > 0 and i > 0:
s -= i
i -= 1
if s == 0:
ways += 1
return ways
Sept. 8, 2019