class Solution:
def FindContinuousSequence(self, tsum):
# write code here
l = r = sum_ = 1
res = []
while l <= tsum//2:
while sum_ < tsum:
r += 1
sum_ += r
if sum_ == tsum:
res.append(range(l,r+1))
sum_ -= l
l += 1
return res
网友评论