Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Pawn Brotherhood by darasg2008
def safe_pawns(pawns):
q=0
for i in pawns:
litera=ord(i[0])-1
cyfra=int(i[1])-1
adres=chr(litera)+str(cyfra)
adres2=chr(litera+2)+str(cyfra)
if adres in pawns:
q=q+1
elif adres2 in pawns:
q=q+1
return q
Oct. 25, 2016