September 24, 2020

Counting Set Bits ::Draft

I don’t tend to really bother with the Perl/Raku weekly challenges, but I do occasionally come across blog posts by others who have solved them. This particular one intrigued me, however, to the point where I was still thinking it through when I woke up in the morning. Specifically, the first task: You are given a positive number $N. Write a script to count the total number of set bits of the binary representations of all numbers from 1 to $N and return $total_count_set_bit % 1000000007. Read more

© Altreus 2020

Powered by Hugo & Kiss.