about | help | code help+videos | done | prefs |
You are building a rectangular solid out of 1 cm cubes. Each rectangular solid will have a length, width, and height. Determine if the cubes in that solid can be restacked in order to make a large cube (all three dimensions must be equal) using all of the 1 cm cubes from the original rectangular solid with no additional 1 cm cubes being used. The method makeCube will return the length of the resulting cube if one is possible. Return 0 if no cube can be made. makeCube(100000, 1, 10) → 100 makeCube(11, 121, 1) → 11 makeCube(2000, 2, 2) → 20 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 480
Copyright Nick Parlante 2017 - privacy