代码展示:
truth, N = input().split()
N = int(N)
while N>0:
password = input()
if password == '#':
break
elif password != truth:
print('Wrong password:',password)
N -= 1
elif password == truth:
print('Welcome in')
break
if N == 0:
print('Account locked')
测评结果: