I think the answer choice is E (27 ways). Because the paint-color that is put on one cube is independent of the color put on the rest of the two cubes.

Therefore, the total no. of ways of painting any of the given 3 colors on a cube is 3 ways. Since there are 3 cubes, the total ways = 3^3 = 3*3*3 = 27.