Amazon Interview Question

production floor math problem