b***y 发帖数: 2799 | 1 ☆─────────────────────────────────────☆
helpme (范坚强) 于 (Mon Mar 10 11:52:52 2008) 提到:
发信人: pumpkin2009 (南瓜), 信区: JobHunting
标 题: 问一道MS面试题
发信站: BBS 未名空间站 (Mon Mar 10 04:49:16 2008)
If the Fibonacci series is 1,2,3,5,8,13,..... then 10 can be written as 8 +
2 ==> 10010 and 17 can be written as 13 + 3 + 1 ==> 100101. Got it??
The Question was, given n, I need to get all possible representations of n
in Fibonacci Binary Number System.
as 10 = 8 + 2 ==> 10010
also 10 = 5 + 3 + 2 ==> 1110
☆───── |
|