I’m unable to understand the logic behind this question. There’s no editorial on this question. Can someone please help me out ? Thanks
I am not sure but this
Question seems very much similar. And it has editorial as well. This might help
Along with that, you will need digit DP to count total nos in the range [1,N] with ith bit on. Later you can work on the lines of EXPTPROD to find expect prob of ith bit on.
Thanks @l_returns @ aryanc403. I’ll check the links