solution
- 测试点2,5 : The test may have space,so you should use getline() function but not cin() function
#include<iostream>
#include<string>
using namespace std;
int main(){string ans, test;int n, cnt = 0;cin >> ans >> n;getchar();while(cnt < n){getline(cin, test);if(test == "#") break;if(ans == test){cout << "Welcome in";return 0;}else cout << "Wrong password: " << test << endl;cnt++;}if(cnt >= n) cout << "Account locked";return 0;
}