The factory creates 300 gummy bears a minute, which means it produces 300 / 50 = <<300/50=6>>6 packets of gummy bears per minute.
It would take 240 / 6 = <<240/6=40>>40 minutes to manufacture enough gummy bears to fill 240 packets.
#### 40