Bending Spoons Interview Question

Solve some logic problem in a limited time.