-1

This is a problem I have been trying to work on for the last week and I have been struggling a lot. I think I finally got it to work, but I am still not fully sure if my R code is correct. Here is the problem:
Suppose there is a factory that on day 1 has 100 boxes
New boxes arrive according to s...