Pergunta de entrevista da empresa Bending Spoons

Questions about maths and logic