#C1139. Password Validation
Password Validation
Password Validation
Given a string representing a password candidate, determine if it is valid based on the following rules:
- The length of the password must be between \(8\) and \(20\) characters (inclusive).
- The password must not contain any whitespace characters.
- The password must contain at least one lowercase letter.
- The password must contain at least one uppercase letter.
- The password must contain at least one digit.
If all the above conditions are met, output VALID
; otherwise, output INVALID
.
inputFormat
The input consists of a single line containing a string which is the password candidate. The string may include alphanumeric characters and symbols.
outputFormat
Output a single line containing either VALID
or INVALID
according to whether the password meets the specified criteria.
ValidPass1
VALID