# Julia, <s>29</s> 27 bytes

    x%y=prod(x)÷cumprod(x)⋅y

[Try it online!]

[Try it online!]: http://julia.tryitonline.net/#code=eCV5PXByb2QoeCnDt2N1bXByb2QoeCnii4V5CgpwcmludGxuKFs1LCAxMF0lWzQsIDJdKQpwcmludGxuKFsxMCwgMTAsIDQsIDYyLCA3XSVbMSwgMiwgMywgNCwgNV0pCnByaW50bG4oWzUsIDEsIDEwXSVbMywgMCwgN10pCnByaW50bG4oWzYsIDYsIDYsIDYsIDYsIDYsIDYsIDYsIDYsIDZdJVszLCAxLCA1LCA1LCAzLCAwLCA1LCAyLCA1LCA0XSk&input=