Goldman Sachs interview question

1000 pirates problem (deviding a gold)