Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Just count solution in Clear category for Pawn Brotherhood by nickie
def safe_pawns(pawns):
def supports(p, q):
return abs(ord(q[0])-ord(p[0])) == 1 and ord(q[1])-ord(p[1]) == 1
def safe(p):
return any(supports(q, p) for q in pawns)
return sum(1 for p in pawns if safe(p))
Sept. 4, 2014
Comments: