problem 6 {sum square diff} -> ruby