看板 Grad-ProbAsk 關於我們 聯絡資訊
※ 引述《CaliforCat (加州貓)》之銘言: : 今天那題0~9的n個digital number 包含2,7不包含0,3,9 : 有人說是7^(n-2) : 但包含的2,7這兩個bit不用考慮可放的位置 : 再乘n(n-1)嗎? 這題雖然我會用EGF做出來,但不知道要如何用排容做,第一步算包含2的個數,然後想到 2可以有1,2,3………個,我就卡住了 請問一下,這題要怎麼用 排容做啊? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 110.28.64.164 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Grad-ProbAsk/M.1579521811.A.600.html
mathtsai: 7^(n-2) - 5^(n-2) ? 01/20 20:10
mathtsai: 沒事 想錯 01/20 20:10
mathtsai: 7^(n-2) -> 不包含0,3,9 5^(n-2) -> 不包含0,3,9 & 2,7 01/20 20:12
Ricestone: 7^n-不包含2-不包含7+不包含7跟2 01/20 20:18
Aa841018: 謝謝兩位大大,我好像想的太複雜了… 01/20 20:24
mathtsai: 我打錯 被文章n-2影響 應該是7^n - 5^n 01/20 21:05
mathtsai: R大的算式好像不太一樣? 01/20 21:05
Ricestone: 7^n-5^n是有2or7,我的是有2and7 01/20 21:08
mistel: 我記得這題意思應該是同時含2and7 01/20 21:47
Aa841018: 他的敘述就是contain 2,7 not cotain 0,3,9應該是and的 01/21 03:58
Aa841018: 意思吧? 01/21 03:58
Ricestone: 原題是寫the digits 2 and 7 but not the digits 0,8,9 01/21 04:06