Problem Link : https://codeforces.me/problemset/problem/579/A
Initially unable to solve it I went through editorial, then found that it tells that answer is the count of set bits. Although I get the intuition, but can we prove that counting the bits would give the minimal answer? Please help, thanks in advance.
My Solution : https://codeforces.me/contest/579/submission/131036138



