Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Pawn Brotherhood by viktor.chyrkin
def safe_pawns(pawns: set) -> int:
c = 0
for i in pawns:
if chr(ord(i[0]) - 1) + str(int(i[1]) - 1) in pawns or chr(ord(i[0]) + 1) + str(int(i[1]) - 1) in pawns:
c += 1
return c
Oct. 10, 2022
Comments: