You are viewing a single comment's thread. Return to all comments →
some more levels of refactoring... :)
puts gets.strip.each_char.with_index.count { |c, i| c != (i % 3 % 2 == 0 ? 'S' : 'O') }
Seems like cookies are disabled on this browser, please enable them to open this website
Mars Exploration
You are viewing a single comment's thread. Return to all comments →
some more levels of refactoring... :)