Seongtaek's Secret Password
Time limit1sMemory limit1024 MB
Given N strings, the task is to print yes for each string whose length is between 6 and 9 characters, otherwise no.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
Seongtaek, a student at Busan Cyber University, has to check whether a given string can be used as the password for the front door, at his mother's request. He has to study, so let's help him!
The rules for a usable password are as follows.
- A password must be at least 6 characters and at most 9 characters long.
For example, 123124 is a valid password, and 1202727161 is an invalid one. Given a string, determine whether it can be used as the front door password.
Input
The first line contains the number of strings .
From the second line onward, each of the next lines contains one string made only of digits and English uppercase and lowercase letters.
Output
For each string, print yes if it can be used as a password, otherwise print no.
Constraints
- Each string has a length of at least 1 and at most 20.