Topic: Bit Manipulation Problem / Level: beginner

Problem: Write a function to find the total number of set bits in the binary representations of numbers from 1 to n.

Run the code to see the output here...