27/300
难。
python里面有算排列组合的函数。这次要用到的是itertools
的combinations_with_replacement()
可以对比一下combination
s和combinations_with_replacement()
的区别。
combination
= C n k C_{n}^{k} Cnk…
combinations_with_replacement(‘ABC’, 2) --> AA AB AC BB BC CC
nums = range(11)
n =