Olympiad Question Logical Solution