He proposes that he give the men a riddle, and if they can solve it within seven days he will give them thirty pieces of linen and thirty festal robes.
The practice in that culture was that, and especially when you think people were being invited immediately from the streets to come in, they provided the festal garment.