Copyright © University of Cambridge. All rights reserved.
30 different painted cubes.
Let the six faces be painted a, b, c, d, e, and f.
With face a opposite face b there are six arrangements for the other four colours around the cube: cdef, cdfe, cedf, cefd, cfde and cfed.
Likewise for the face a opposite face c; face a opposite face d; face a opposite face e; and face a opposite face f. All have six arrangements for the remaining four colours.
Hence the total is 5 x 6 = 30 arrangements.