#include<iostream>
using namespace std;
int main(){
string passwd,input;
int n;
cin>>passwd>>n;
getchar();
int count=0;
while(true){
getline(cin,input);
if(input=="#"){
break;
}
count++;
if(input==passwd){
cout<<"Welcome in";
break;
}
if(input!=passwd){
cout<<"Wrong password: "<<input<<endl;
}
if(count==n){
cout<<"Account locked";
break;
}
}
}
1067. 试密码(20) PAT 乙级
最新推荐文章于 2022-10-30 16:26:28 发布