Four students Art, Ben, Cal and Don competed in a series of four quiz contests involving English, General knowledge, Logic, and Math. They are now wondering about the outcome.
Art thinks Don won the Logic award.
Ben thinks Cal won the English prize.
Cal thinks Art did not win the Math title.
Don thinks Ben won the General Knowledge trophy.
As it turns out, both surmises about winners of the English and General Knowledge contests were wrong, and both surmises about the winners of the Math and Logic contests were correct.
Who won which contest?
DECLARE SUB permute (a$)
CLS
a$ = "eglm": h$ = a$
DO
IF RIGHT$(a$, 1) = "l" THEN
IF MID$(a$, 3, 1) <> "e" THEN
IF MID$(a$, 1, 1) <> "m" THEN
IF MID$(a$, 2, 1) <> "g" THEN
PRINT a$
END IF
END IF
END IF
END IF
permute a$
LOOP UNTIL a$ = h$
produces
emgl
geml
being the subjects in order for Art, Ben, Cal and Don.
That indicates two solutions, each involving one win per person:
General Art English
English Ben Math
Math Cal General
Logic Don Logic
Either way, the sequence of surmises given is true, false, true, false.
|
Posted by Charlie
on 2013-11-29 12:34:03 |