# 组合

<p>给定两个整数 <em>n</em> 和 <em>k</em>，返回 1 ... <em>n </em>中所有可能的 <em>k</em> 个数的组合。</p>
<p><strong>示例:</strong></p>
<pre><strong>输入:</strong>&nbsp;n = 4, k = 2<strong><br />输出:</strong>[[2,4],[3,4],[2,3],[1,2],[1,3],[1,4],]</pre>

## template

```python
class Solution(object):
	def combine(self, n, k):
		res = []
		self.get_combine(res, [], n, k, 1)
		return res
	def get_combine(self, res, prefix, n, k, start):
		if k == 0:
			res.append(list(prefix))
		elif start <= n:
			prefix.append(start)
			self.get_combine(res, prefix,
							 n, k - 1, start + 1)
			prefix.pop()
			self.get_combine(res, prefix,
							 n, k, start + 1)
if __name__ == "__main__":
	s = Solution()
	print (s.combine(4, 2))
```

## 答案

```python

```

## 选项

### A

```python

```

### B

```python

```

### C

```python

```