Problem #161
Binary Play
Consider a set S(N) such that S(N) contains all sequences of 0 and 1 of length N in which no two 1's are adjacent. For example:
S(3) = (000,001,010,100,101)
Let A = No. of elements in S(30)
B = Sum of digits of A
You have to output no. of 0 appearing in B^{th} sequence of S(30) when arranged lexographically.