Cut Cube Puzzle

Let there is a cube of length L . ALL the faces of cube are painted with different colors. This cube is cut into n smaller but identical cubes by minimum possible number of cuts. Write a program to calculate:-
(a) Number of pieces has exactly three painted faces.
(b) Number of pieces has exactly two painted faces.
(c) Number of pieces has exactly one painted face.
(d) Number of pieces have exactly no painted face
Let color on faces is (A, B, C, D, E, and F)
Enter the number of pieces a cube should be cut into =125
Cubes with 0 colored face - 1
Cubes with 1 colored face - 6 (A, B, C, D, E, F)
Cubes with 2 colored faces - 12 (AB, AC, AD, AE, FB, FC, FD, FE, BC, CD, DE, EB)
Cubes with 3 colored faces - 8 (ABC, ACD, ADE, AEB, FBC, FCD, FDE, FEB)

Questions by Tapasweni


This Question is not yet answered!


Related Answered Questions


Related Open Questions