user = "luo"
password = "123456"
x = 3

while x > 0:
    user_test = input("\n请输入账号：")
    password_test = input("请输入密码：")

    if user_test == user and password_test == password:
        print("登录成功！")
        break
    else:
        x -= 1
        if x > 0:
            print("账号或密码错误，你还可以尝试" + str(x) + "次")
        else:
            print("错误次数过多，账号已锁定！")