tic tac toe winner by contina

w=['123','456','789','147','258','369','159','357'];s=set
while 1:x,y=input().split();print("CXO"[(sum(s(a)&s(x)==s(a)for a in w)>0)+2*(sum(s(a)&s(y)==s(a)for a in w)>0)])

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page