Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple 7 Strings solution in Speedy category for Pawn Brotherhood by masterspace.dc
def safe_pawns(pawns):
n=0
for i in pawns:
for j in pawns:
if i!=j and (ord(i[0])==ord(j[0])+1 or ord(i[0])==ord(j[0])-1) and int(i[1])==int(j[1])+1:
n+=1
break
return n
Nov. 1, 2017