Volume of rectangular prism = 1 1/3 x 5/6 x 2/3 = 4/3 x 5/6 x 2/3 = 20/27
Volume of cube = 1/6 x 1/6 x 1/6 = 1/216
Number of cubes that will pack the rectangular prism = 20/27 / 1/216 = 160
The first digit may be 1 or 8.
The second digit may be 1, 2, 4, 8.
The third digit may be 1, 3, 5, 7, 9.
There are 
The probability that this is the correct code is 
It is both equations are equal to -0.076.