2014年2月27日
摘要: 描述For a string of n bits x1, x2, x3, …, xn, the adjacent bit count of the string is given by fun(x) = x1*x2 + x2*x3 + x3*x 4 + … + xn-1*x nwhich counts the number of times a 1 bit is adjacent to another 1 bit. Forexample: Fun(011101101) = 3 Fun(111101101) = 4 Fun (010101010) = 0 Write a program w... 阅读全文
posted @ 2014-02-27 20:17 细雨微光 阅读(388) 评论(0) 推荐(0)