Loading web-font TeX/Math/Italic

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.

Contributed by Harsh Jain

Solved by 127 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.