You are viewing a single comment's thread. Return to all comments →
I did mine exactly the same way in Ruby, but I think it is less confusing to read.
puts gets.strip.to_i.to_s(2).split('0').max.length
Seems like cookies are disabled on this browser, please enable them to open this website
Day 10: Binary Numbers
You are viewing a single comment's thread. Return to all comments →
I did mine exactly the same way in Ruby, but I think it is less confusing to read.