Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Count Consecutive Summers by sanello
def count_consecutive_summers(num):
count = 1
for i in range(1, num // 2 + 1):
amount = 0
while amount < num:
amount += i
if amount == num:
count += 1
i += 1
return count
Aug. 26, 2019