Steven's Dev Blog
Tips to remind for the FUTURE.
Showing posts with label
algrithm
.
Show all posts
Showing posts with label
algrithm
.
Show all posts
Thursday, August 8, 2013
python 3 line to solve 8 queen
from itertools import *
c = range(8)
print len([v for v in permutations(c) if 8==len(set(v[i]+i for i in c))==len(set(v[i]-i for i in c))])
Older Posts
Home
Subscribe to:
Posts (Atom)