Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
One too big line, chr + ord methode, list return safe pawns solution in Clear category for Pawn Brotherhood by Mesure
def safe_pawns(pawns: set) -> int:
return (
len([x for x in pawns if ''.join([chr(ord(x[0]) - 1), chr(ord(x[1]) - 1)]) in pawns
or ''.join([chr(ord(x[0]) + 1), chr(ord(x[1]) - 1)]) in pawns])
)
June 29, 2021