-->
当前位置:首页 > 题库

PROGRAMMING:QQ account application and login

Luz5年前 (2021-05-10)题库544
Realize QQ new account application and old account login simplified version function. The biggest challenge is: it is said that the QQ number now has 10 digits.
###Input format:
Input first gives a positive integer $$n $$($$Le 10 ^ 5 $$), followed by the $$n $$line instruction. The format of each line of instruction is: "command character (space) QQ number (space) password". When the command character is "n" (for new), it means to apply for a new QQ number, followed by the number and password of the new account; When the command character is "L" (for login), it means the login of the old account, followed by the login information. QQ number is not more than 10 digits, but more than 1000 (it is said that QQ boss's number is 1001). The password is a string of no less than 6 bits, no more than 16 bits, and no spaces.
###Output format:
For each instruction, the corresponding information is given
1) If the new account application is successful, output "new: OK"< br>
2) If the new application number already exists, "error: exist" will be output< br>
3) If the login of the old account is successful, "login: OK" will be output< br>
4) If the old account QQ number does not exist, output "error: not exist"< br>
5) If the old account password is wrong, "error: wrong PW" will be output.
###Input example:
```in
five
L 1234567890 myQQ@qq.com
N 1234567890 myQQ@qq.com
N 1234567890 myQQ@qq.com
L 1234567890 myQQ@qq
L 1234567890 myQQ@qq.com
```
###Output example:
```out
ERROR: Not Exist
New: OK
ERROR: Exist
ERROR: Wrong PW
Login: OK
```






answer:If there is no answer, please comment