“讲故事的能力”是一种电影技术能力# Movie - 无限影话
Z*Z
1 楼
【 以下文字转载自 InterviewHackers 俱乐部 】
发信人: ZhangBZ (向日葵), 信区: InterviewHackers
标 题: 来个bit题
发信站: BBS 未名空间站 (Fri Jul 2 13:22:29 2010, 美东)
感觉这几个是相关的:
1. Let f(k) = y where k is the y-th number in the increasing sequence of non
-negative integers with the same number of ones in its binary representation
as y, e.g. f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 1, f(4) = 3, f(5) = 2, f(6)
= 3 and so on. Given k >= 0, compute f(k).
2. There is a series of numbers in ascending order. All these numbers have t
he sam
发信人: ZhangBZ (向日葵), 信区: InterviewHackers
标 题: 来个bit题
发信站: BBS 未名空间站 (Fri Jul 2 13:22:29 2010, 美东)
感觉这几个是相关的:
1. Let f(k) = y where k is the y-th number in the increasing sequence of non
-negative integers with the same number of ones in its binary representation
as y, e.g. f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 1, f(4) = 3, f(5) = 2, f(6)
= 3 and so on. Given k >= 0, compute f(k).
2. There is a series of numbers in ascending order. All these numbers have t
he sam