似乎是簡單的排列組合問題,但我的算法怎麽都對不上啊。可能取決與定義

來源: 2014-11-15 13:37:42 [舊帖] [給我悄悄話] 本文已被閱讀:

2 persons: 10*9=90
3 persons: 10*9*8=720
4 persons: 10*9*8*7=5040

total=10*9+10*9*8+10*9*8*7=90+720+5040=5850

but if you disregard the sequence, then it would be like below

2 persons: 10*9/2=45
3 persons: 10*9*8/(3*2)=120
4 persons: 10*9*8*7/(4*3*2)=210
total=45+120+210=375