class Solution(object):
def findContinuousSequence(self, sum):
"""
:type sum: int
:rtype: List[List[int]]
"""
# sn=(a1+an)n/2 an=a1+n-1 sn=(a1+a1+n-1)n/2
# 1000=(1+x)x/2 2000>x+x² x²+x-2000>0
als=[]
for x in range(1,sum):
for y in range(45):
num=(x+x+y-1)*y/2
if num==sum:
als.append([i for i in range(x,x+y)])
break
# print(als)
return als