1067 试密码 (20 分) python

password,n = input().split(" ")
n = int(n)
for i in range(n):
    ipt = input()
    if ipt == "#":
        break
    if ipt == password:
        print("Welcome in")
        break
    else:
        if i == n - 1:
            print("Wrong password: %s"%ipt)
            print("Account locked")
            break
        else:
            print("Wrong password: %s"%ipt)

猜你喜欢

转载自blog.csdn.net/weixin_41775301/article/details/87858347