edited sum_of_cubes.rb