Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
The Fog Creek Dev Application Challenge @
hash = 910897038977002
letters = "acdegilmnoprstuw"
answer = ""
9.times do |x| #9 letter string loop
remainder = hash % 37 #get the remainder for lookup
answer = answer + letters[remainder] #add letter to the answer
hash = (hash - remainder) / 37 #now we're evenly divisible
puts answer.reverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment