Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Sum and check solution in Clear category for Pawn Brotherhood by cheikhnamouna
def safe_pawns(pawns: set) -> int:
return sum(chr(ord(p[0]) + 1) + str(int(p[1]) - 1) in pawns or chr(ord(p[0]) - 1) + str(int(p[1]) - 1) in pawns for p in pawns)
Dec. 30, 2018