#C7888. Password Strength Checker
Password Strength Checker
Password Strength Checker
The task is to evaluate the strength of given passwords. A strong password must satisfy all of the following conditions:
- It has a length of at least 8 characters.
- It contains at least one lowercase letter.
- It contains at least one uppercase letter.
- It contains at least one digit.
- It contains at least one special character from the set \(\{!@#$%^&*()-+\}\).
The program should read passwords from standard input (stdin), one per line. Input terminates when a line containing a single period "." is encountered. For each password (excluding the terminating dot), output the result on a separate line: STRONG
if the password meets all conditions, otherwise WEAK
.
inputFormat
The input consists of multiple lines. Each line is a candidate password. The input ends with a line that contains only a single period ('.'), which should not be processed.
outputFormat
For each password provided (except for the terminating '.'), print a line containing either 'STRONG' if the password satisfies all the criteria, or 'WEAK' otherwise.## sample
P@ssw0rd
weakpassword
StrongPass1
12345678!
`~Password1
.
STRONG
WEAK
WEAK
WEAK
WEAK
</p>