3d surface area hackerrank solution in python