Back to task

158 symbols python3
Thu Oct 20 04:43:34 2016 Sait2000
N,*z=range(int(input())),[]
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),sep='')


Leave a comment

Parsed as Markdown

Login to leave a comment