Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Count of Count solution in Clear category for Count Consecutive Summers by obone
from functools import reduce
def count_consecutive_summers(num):
s = [reduce(lambda x, y: x + y if x < num else x,
[k for k in range(i, num)])
for i in range(1, num)]
return s.count(num) + 1
June 14, 2019