Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Pawn Brotherhood by Rudeboyz_Squad
def safe_pawns(p: set) -> int:
c = 0
pa = [(ord(i[0]),int(i[1])) for i in p]
for x,y in pa:
if (chr(x+1)+str(y-1) in p) or (chr(x-1)+str(y-1) in p):
c += 1
return c
March 10, 2019