Just stumbled upon this neat maths/statistics curiosity when watching YouTube.
Watch the Veritasium video here.
The problem goes like this: Imagine there are 100 prisoners, each assigned a unique number from 1 to 100. In front of them are 100 boxes, also numbered from 1 to 100, but the numbers inside the boxes are randomly shuffled. Each prisoner needs to find the box containing their own number. Each prisoner can only open at most 50 boxes. If every single prisoner manages to find their own number within those 50 attempts, all the prisoners are set free. However, if even one prisoner fails, they all remain imprisoned (or executed depending who you ask).
I killed two birds with one stone by getting into Rust a bit and writing a program that implements the 100 prisoners problem. Indeed, on average, the prisoners manage to escape the prison in 31% of the cases. Quite amusing!