Light Mode
Dark Mode
Non-iterative solution

Hi,

I've looked at numerous solutions and they all involve loops, sums, joins or complex operations.

I was a bit surprised because I've come up with a very simple solution in which the hardest part is to count the numbers of 1 in first. Then, there's a really simple formula that directly gives the result.

Am I really the only one who found that?

Created: Dec. 25, 2016, 5:07 p.m.
Updated: Dec. 27, 2016, 5:18 a.m.
0
23
User avatar
brubru777