count = 0 for i in range(1,4): for j in range(1,4): for k in range(1,5): if i+j+ k == 8: count += 1 print(count)
盒子里有3个红球,3个蓝色球,4个黄球,现刘柱要从盒子里拿出8个球,问有多少种
原文:https://www.cnblogs.com/sunjingtao/p/10096960.html