Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
second solution in Clear category for Pawn Brotherhood by thealfest1
def safe_pawns(pawns: set) -> int:
return len({p for p in pawns if check(p, -1) in pawns or check(p, 1) in pawns})
def check(p, s):
return chr(ord(p[0]) + s) + chr(ord(p[1]) - 1)
Jan. 8, 2019