Back to task

156 symbols python2
Fri Oct 21 07:21:45 2016 Sait2000
N=range(int(input()))
z=[],
for r in N:z=[s+[(-r,c)]for s in z for c in N if~-any(j in(r+i+j,c,c+r+i,c-i-r)for i,j in s)]
for s in z:print`map(max,s)`[1::3]


Leave a comment

Parsed as Markdown

Login to leave a comment