Compute total resistance of a cube of resistors