Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created October 2, 2016 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/d55278fa50358a3697613f4955733292 to your computer and use it in GitHub Desktop.
Save anonymous/d55278fa50358a3697613f4955733292 to your computer and use it in GitHub Desktop.
def solution(a, b)
c = 0
if a > 0 && b > 0
aArray = a.to_s.split('').map(&:to_i)
bArray = b.to_s.split('').map(&:to_i)
for i in aArray
cArray = cArray + aArray[i]
cArray = cArray + bArray[i]
end
# puts aArray.class
else
puts "non ok"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment