目录
从前M个字母中任取N个的组合 [2*+]
输出前M个字母中任取N个的所有组合情况
Input
输入两个数M 和 N
M>=N
1<=M<=10Output
按字典序输出组合情况
Sample Input
4 2Sample Output
AB AC AD BC BD CD
程序设计
Python
def dfs(s,n,t,start): if len(s)==t: print(s) return for i in range(start,n):
目录
输出前M个字母中任取N个的所有组合情况
Input
输入两个数M 和 N
M>=N
1<=M<=10Output
按字典序输出组合情况
Sample Input
4 2Sample Output
AB AC AD BC BD CD
Python
def dfs(s,n,t,start): if len(s)==t: print(s) return for i in range(start,n):