77 组合
class Solution:
def combine(self, n: int, k: int) -> List[List[int]]:
rets=[]
t=[]
def sub(s,t):
if len(t)==k:
rets.append(t[:])
return
for i in range(s+1,n+1):
t.append(i)
sub(i,t)
t.pop()
sub(0,t)
return rets