OpenSymmetry Interview Question

They asked me a logic problem