code: public Matrix3D times(double s) {
          Matrix3D A = this;
          Matrix3D C = new Matrix3D(A);
          for (int i = 0; i < C.M; i++)
              for (int j = 0; j < C.N; j++)
                  for (int l = 0; l < C.K; l++)
                      C.data[i][j][l] *= s;
          return C;
      }
docs: return C = A * s