Amazon interview question

production floor math problem