This is a simple (non-optimized) simulation program for a riddle called The 100 Prisoners Riddle
.
I have created the solution on the approach showed by this awesome channel on youtube named Veritasium.
Video Link: https://www.youtube.com/watch?v=iSNsgj1OCLA
If anyone want to improve this piece of code can submit a pull request.