Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
(x%2 == 0) * (x//2) solution in Clear category for Count Consecutive Summers by flpo
def count_consecutive_summers(n):
return sum(n%x == (x%2 == 0) * (x//2) for x in range(1, int((2*n)**0.5)+1))
Dec. 11, 2018