Problem 2175. Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices parallel to the faces of the cube, he cuts the cube into 1x1x1 cubes.
Some cubes are completely free of paint:x
Some cubes are painted red on only one side:y
Some cubes are painted red on two sides:z
Help him find x,y & z
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers89
Suggested Problems
-
Find the sum of all the numbers of the input vector
47714 Solvers
-
Increment a number, given its digits
643 Solvers
-
Back to basics 19 - character types
261 Solvers
-
311 Solvers
-
418 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!