scala twoliner
```scala []
object Solution {
  def minChanges(n: Int, k: Int): Int =
    val (ns,ks) = LazyList.unfold((n,k)){case (n1,k1) =>
      Option.when(n1!=0 || k1!=0) {((n1&1,k1&1), (n1>>1,k1>>1))}
    }.collect{case (a,b) if a!=b => a-b}.partition(_ > 0)
    if(ks.nonEmpty) -1 else ns.sum
}
```
['Bit Manipulation', 'Scala']