# 숫자 야구
defsolution(baseball):answer=0foriinrange(123,988):ii=str(i)flag=Trueif(ii[0]==ii[1]orii[1]==ii[2]orii[0]==ii[2]):continueif(ii[0]=='0'orii[1]=='0'orii[2]=='0'):continueforjinrange(len(baseball)):strike=0ball=0num=str(baseball[j][0])forainrange(3):forbinrange(3):ifa==bandii[a]==num[b]:strike+=1continueelifii[a]==num[b]:ball+=1continueifbaseball[j][1]!=strikeorbaseball[j][2]!=ball:flag=Falsebreakifflag:answer+=1returnanswer