Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ("123456").split("").each_slice(3).to_a
- hey = array0.reduce(0) { |a, s| a + s.to_i }
- bye = array1.reduce(0) { |a, s| a + s.to_i }
- if hey == bye
- return true
- else return false
- end
Advertisement
Add Comment
Please, Sign In to add comment