ChaseDream
搜索
返回列表 发新帖
查看: 675|回复: 2
打印 上一主题 下一主题

树雪DS 题求教

[复制链接]
跳转到指定楼层
楼主
发表于 2011-2-3 22:23:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
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
哪位指点一下?
收藏收藏 收藏收藏
沙发
发表于 2011-2-4 03:57:49 | 只看该作者
(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.
板凳
 楼主| 发表于 2011-2-4 14:28:59 | 只看该作者
谢谢!
您需要登录后才可以回帖 登录 | 立即注册

Mark一下! 看一下! 顶楼主! 感谢分享! 快速回复:

手机版|ChaseDream|GMT+8, 2025-10-12 09:55
京公网安备11010202008513号 京ICP证101109号 京ICP备12012021号

ChaseDream 论坛

© 2003-2025 ChaseDream.com. All Rights Reserved.

返回顶部