Domanda di colloquio di OpenSymmetry

They asked me a logic problem