分页: 2 / 2

Re: 来一个排列组合的问题

发表于 : 2023年 1月 15日 03:49
lbs
lbs 写了: 2023年 1月 15日 03:47 调教一下还是可以的:


孺子可教
接着我还想欺负它一下,没想到这家伙居然没有上当:
Q: Can you list all the scenarios?

A: I apologize, but it is not possible to list all 265 scenarios for 6 people exchanging their cars without holding their own cars, as that would be an incredibly large number of possibilities. The number 265 is the total number of derangements, a mathematical term for a permutation of a set of objects in which none of the objects appear in their original position. It is calculated using mathematical formulas and it is not possible to list all the possible scenarios. However, you can use the formula to check if the number of possibilities is correct.
Let me know if you need further help.

Re: 来一个排列组合的问题

发表于 : 2023年 1月 15日 07:35
verdelite
lbs 写了: 2023年 1月 15日 03:49 接着我还想欺负它一下,没想到这家伙居然没有上当:
哈哈,看着它还没想到写 python code 来列出所有可能性. 。前面我写的code ,去掉判断01的和求和的,就可以用来列出。

下次叫它写个python 来解这道题。

Re: 来一个排列组合的问题

发表于 : 2023年 1月 15日 08:20
TheMatrix
lbs 写了: 2023年 1月 15日 03:47 调教一下还是可以的:


孺子可教
嗯,有潜力啊。

Re: 来一个排列组合的问题

发表于 : 2023年 1月 15日 08:53
Pegasi
verdelite 写了: 2023年 1月 14日 14:32 6对夫妻经常新年聚会。这次他们发现,子女都离家了,就剩下他们自己了,不像往年那么热闹了。好无聊。

就有人提议男人们把钥匙串放桌上。女人们来拿钥匙,每人拿一串,但是不得拿自己丈夫的钥匙串(自己丈夫的钥匙串当然是认得的)。问有几种不同的拿法。
容斥原理