Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Pawn brotherhood solution in Clear category for Pawn Brotherhood by KirillovaV
def safe_pawns(pawns: set) -> int:
result = 0
for p in pawns:
if (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):
result += 1
return result
Jan. 21, 2021