Re: [理工] [離散] 98台大電機
※ 引述《Byzantin (拜占庭)》之銘言:
: 假設1為改變status,0為不改變
: locker 1 2 3 4 5 6 7 ‧‧‧
: student1 1 1 1 1 1 1 1 ‧‧‧
: student2 0 1 0 1 0 1 0 ‧‧‧
: student3 0 0 1 0 0 1 0 ‧‧‧
: student4 0 0 0 1 0 0 0 ‧‧‧
: ‧
: ‧
: ‧
: locker還是open的條件是該行為1的bit數有奇數個,
: 每個locker在遇到編號的因數時該列bit會是1
: 所以最後是open的locker它的編號的因數為奇數個
: 即完全平方數,所以是1,4,9,16,25,36,49,64,81,100
問題:
想請問上面黃色部份的意思,有點看不懂。(原題目在下面)
另外在黃子嘉老師課本1-72範例二提到的是正因數個數,不曉得和這個有什麼關係。
感謝各位耐心看完題目及問題,謝謝。
: ※ 引述《ceo890710 (Drinking)》之銘言:
: : ---------------------------------------------------------------------
: : One hundred students enter a locker room that contains 100 lockers.
: : The first student open all the lockers.The second student changes the
: : status(from open to closed, and vice versa) of every other locker,
: : starting with the second locker.The third student then changes the
: : status of every third locker,starting with the third locker.In general,
: : for 1<=K<=100,the kth student changes the status of every kth locker,
: : starting with the kth locker.After the 100th student has gone through
: : the lockers,which lockers are left open?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.193.221.223
推
09/06 00:02, , 1F
09/06 00:02, 1F
推
09/06 00:08, , 2F
09/06 00:08, 2F
→
09/06 00:36, , 3F
09/06 00:36, 3F
→
09/06 00:42, , 4F
09/06 00:42, 4F
→
09/06 00:43, , 5F
09/06 00:43, 5F
推
09/06 01:04, , 6F
09/06 01:04, 6F
→
09/06 09:40, , 7F
09/06 09:40, 7F
→
09/06 09:41, , 8F
09/06 09:41, 8F
→
09/06 09:41, , 9F
09/06 09:41, 9F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 5 之 5 篇):