How to count numbers whose binary representation has number of 1's multiple of 3 for all numbers between 1 to N.
For ex — N = 19 then ans = 5 Since, 7, 11, 13, 14, 19 have number of 1's multiple of 3.
Constraint : n < 1016
Count numbers of 1 multiple of 3 till N
How to count numbers whose binary representation has number of 1's multiple of 3 for all numbers between 1 to N.
For ex — N = 19 then ans = 5 Since, 7, 11, 13, 14, 19 have number of 1's multiple of 3.
Constraint : n < 1016