- ©«¤l
- 12
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 50
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office2016
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2014-3-22
- ³Ì«áµn¿ý
- 2020-5-27
|
¦U¦ì¤j¤j¦n
¥H¤U¬O§Ú°µªº²qAB¼Æ¦rªºµ{¦¡½X
·Q½Ð±Ð«ç»ò¥Î§ó²¼äªº¤è¦¡¨Ó¼g
Ans=input()
AnsList=list(Ans)
while True:
Guess=input()
GusList=list(Guess)
A=B=0
for i in range(len(GusList)):
if GusList[i]==AnsList[i]:
A+=1
GusList[i]=""
elif GusList[i]!=AnsList[i] and GusList.count(AnsList[i])==1:
B+=1
else:
continue
if A==4:
print("%dA%dB" % (A,B))
print("You Win!")
break
else:
print("%dA%dB" % (A,B)) |
|