-
-
Save anonymous/d55278fa50358a3697613f4955733292 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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