Skip to main content
5 of 6
added a commented version
Arnauld
  • 197.8k
  • 20
  • 180
  • 650

#JavaScript (ES6),  73 65  64 bytes

(x,y,z)=>(g=n=>!n||g(n-1)/(s=n%z-~(n/z%y)+n/z/y%x|0)*-~s)(x*y*z)

Try it online!

###Commented

(x, y, z) => (              // (x, y, z) = input
  g = n =>                  // g is a recursive function taking a counter n
    !n ||                   //   if n = 0, stop recursion and return 1
    g(n - 1) / (            //   otherwise, divide the result of a recursive call by:
      s =                   //     s defined as the sum of:
        n % z               //       k, 0-indexed: n mod z
        - ~(n / z % y)      //       j, 1-indexed: floor((n / z) mod y) + 1
        + n / z / y % x | 0 //       i, 0-indexed: floor((n / z / y) mod x)
    )                       //   
    * -~s                   //   and multiply by s + 1
)(x * y * z)                // initial call to g with n = x * y * z
Arnauld
  • 197.8k
  • 20
  • 180
  • 650