Bending Spoons Interview Question

Logical and math questions mostly for the first round.