Given a flat (1-D) position flat_index into an array of shape shape, return the equivalent multi-dimensional index as a tuple of ints.
flat_index
shape
Input
flat_index = 99, shape = (6, 7, 8)
Output
(1, 5, 3)
solve(...)