```
import copy
class Solution(object):
def __init__(self):
self.ans=[]
def combinationSum3(self, k, n):
"""
:type k: int
:type n: int
:rtype: List[List[int]]
"""
def help(num,k,n,ans):
if k==0 and n==0:
self.ans.append(copy.deepcopy(ans))
return
elif num<=n and k>0 and n>0:
for i in range(num+1,10):
ans.append(i)
help(i,k-1,n-i,ans)
del ans[len(ans)-1]
else:
return
help(0,k,n,[])
return self.ans
```