返回列表 发帖

树雪DS 题求教

X is a positive integer, 2-height of X is defined as the greatest negative integer n where 2 ^n is a factor of X. K and M are two positive integers. Whether 2-height of K is greater than 2-height of M?
1. K is greater than M
2. K is even times of M
答案选B
请问为什么?这道题要求2的K次方大还是2的M次放大。(1)中不是说K >M吗?而且K和M都是正整数,那(1)中肯定是2^K>2^M的呀...
不明白为什么选B
哪位指点一下?
收藏 分享

(Key: B)

(by rosemsem)
题义解析:说对于含2的n次方的数, 2-height 指的是n的值。问k和m谁的2-height大?
(1) K>M
(2) K除以M是偶数.
(please notice K,k; M,m; e)

K = a* 2^k;
M = b* 2^m;

(1) k>m, means nothing.
(2) k/m= (a/b) * (2^k/2^m) = 2^e;
A, b must be odd number, or you can extract at least one more 2, which gonna change k or m. So in this case, (a/b) must be 1, otherwise it would be a fraction.
In a word, k-m=e. K>m.

B is sufficient.

TOP

谢谢!

TOP

返回列表

站长推荐 关闭


美国top10 MBA VIP申请服务

自2003年开始提供 MBA 申请服务以来,保持着90% 以上的成功率,其中Top10 MBA服务成功率更是高达95%


查看