Problem #199
Zero and Big Bits
Zero is a very powerful person. He has N countries (out of total 197) under his control all of which are identical to him. Once he counted the number of ways of arranging all the countries in a list of size 197 (modulo M ) and stored the number in a computer(in binary format) as Zero likes bits. Zero also likes big numbers: More the number of set bits, the happier Zero will be. His happiness is equal to number of set bits in the number. The answer is his happiness.
The world knows only about modular arithmetic with M = 10^9+7. Calculate all the values modulo M. Here N=191.