Задача Codewars Find out whether the shape is a cube

Решаем задачу Codewars: определить, является ли фигура кубом.