我有一个很长的号码。现在我想要的是(以伪代码给出),
int cnt1 = 0
int cnt2 = 0
for each two bits of that long
if the two bits == 11
then cnt1++
else
cnt2++
Print i and i+1 th bits are ... (example 00, 11 etc.) and cnt1 = ... and cnt2 = ...
(for example if number is three (representation "00 00 00 .... 11)"
it will give output cnt1 = 1 and cnt2 = 31)
有人可以帮我怎么做吗?