Re: [機經] 問一題計量
機經已更正了
所以我的疑惑解除了
84. PS:n是非零整數,2^n mod 3=1,問下麵哪個對
1,n大於零
2,3^n=(-3)^n
3,根號下(2^n)是整數
選項有
1,2對
1,3對
2,3對
等等 反正沒有全對的
<v3> 就是那個 2^n 被3除餘1 然後選哪個是對的答案是後面兩個:“3^n>(-3)^n 和 跟
好下2^n 是integer” 那個“n is greater than 0" 是不對的 因為題目裡很明確寫了是
n is nonnegative
If --> --> remainder upon division 1 by 3 is 1 - OK;
If --> --> remainder upon division 2 by 3 is 2 - not OK;
If --> --> remainder upon division 4 by 3 is 1 - OK;
If --> --> remainder upon division 8 by 3 is 2 - not OK;
...
So we can see the pattern of reminders 1-2-1-2-.... --> given condition that
the remainder is 1 when is divided by 3 holds true when . So must be
non-negative even number: 0, 2, 4, ...
I. is greater than zero --> not necessarily true, as can be zero;
II. --> as is even then this statement is always true;
III. --> as is non-negative even number then this statement is always true.
Answer: (II and III only).---------------感謝wytowen
※ 引述《lopao (圭阿圭阿)》之銘言:
: 這個月機經有一題
: 84. PS:n是非零整數,2^n mod 3=1,問下面哪個對
: 1,n大於零
: 2,3^n=(-3)^n
: 3,根號下(2^n)是整數
: 選項有
: 1,2對
: 1,3對
: 2,3對
: 思路:由題目可知,n是除了零的雙數,所以
: 條件1 成立,n為負數不可能除以三餘一
: 條件2 不成立, 因為3^n=(-3)^n n只可能等於零,注意是ps題
: 條件3 成立, 式子說明n是even number,四的倍數除以三都餘一
: 我不懂為什麼條件二不能成立耶
: 作者還特別強調要考慮這是PS題
: 但為什麼n不能為2,4,6,8...之類的非零整數呢
: 是不是我有甚麼地方沒考慮清楚呢
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.240.182.36
推
01/14 00:49, , 1F
01/14 00:49, 1F
討論串 (同標題文章)