```
public class Solution {
public List<List<Integer>> combinationSum3(int k, int n) {
List<List<Integer>> res=new ArrayList<List<Integer>>();
recur(new ArrayList<Integer>(),res,n,1,k);
return res;
}
public void recur(List<Integer> temp,List<List<Integer>> res, int tar,int k,int count){
if(tar==0&&count==0){
res.add(temp);
return;
}
if(count==0||tar<=0)return;
for(int i=k;i<=9;i++){
temp.add(i);
recur(new ArrayList<Integer>(temp),res,tar-i,i+1,count-1);
temp.remove(temp.size()-1);
}
}
}
```