text: function to return the number of solutions
code: < ? php function countSolutions ( $ a ) { $ count = bitCount ( $ a ) ; $ count = ( int ) pow ( 2 , $ count ) ; return $ count ; } function bitCount ( $ n ) { $ count = 0 ; while ( $ n != 0 ) { $ count ++ ; $ n &= ( $ n - 1 ) ; } return $ count ; }