<p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;">門外有三個<a href="http://www.pronic.com.tw/index.php?do=prod&tpid=29" target="_blank">按鍵開關</a>分別對應室內三個燈泡,</p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;">線路良好,但在門外控制<a href="http://www.pronic.com.tw/" target="_blank">開關</a>時候無法看到室內燈的情況,</p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;">現在只你允許進門一次,你要如何確定開關和燈的對應關係呢?</p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p class="separator" style="margin: 0px; font-family: 'Times New Roman'; font-size: medium; text-align: center; clear: both;"><a href="http://www.pronic.com.tw/" target="_blank"><img style="cursor: move;" src="http://pica.nipic.com/2008-01-23/200812321457289_2.jpg" alt="" width="211" height="320" border="0" /></a><span style="color: #0000ee;"><span style="text-decoration: underline;"><a href="http://www.pronic.com.tw/index.php?do=prod&tpid=29" target="_blank">微軟面試題</a></span></span></p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;">解答:</p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;">先開一個燈,維持很長時間的開啟。</p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;">接著關掉燈,再開另一個。</p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;">這時候跑進去看,亮著的那個不用說。</p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;">剩下的兩個不亮的,只要按照燈泡的溫度就可以進行判斷啦!</p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p> <p style="margin: 0px; font-family: 'Times New Roman'; font-size: medium;"> </p>