Bending Spoons interview question

Some exercises based on logic, probability, etc.