Woburn Challenge 2017-18 Round 3 - Junior Division
Problem 3: Uncrackable
You'd like to register an account on an extremely entertaining website. You've already selected a username, but it seems that the requirements for choosing a password are quite strict, in order to completely protect your account from being hacked into. The password must be a string between 8 and 12 characters long (inclusive), such that every character is either a lowercase letter ("
z"), uppercase letter ("
Z"), or digit ("
9"). Furthermore, it must contain at least three lowercase letters, at least two uppercase letters, and at least one digit.
You've got a potential password in mind, a non-empty string made up of at most 100 characters, each of which is a lowercase letter, uppercase letter, or digit. Rather than entering the password into the site and risking rejection, you'd like to determine for yourself whether or not your password would validly satisfy all of the rules.
The first and only line of input consists of a single string, the password.
Output a single string, either "
Valid" if the password is valid, or "
Sample Input 1
Sample Output 1
Sample Input 2
Sample Output 2
In the first case, the password has 8 characters, with 5 lowercase letters, 2 uppercase letters, and 1 digit, meaning that all of the rules are satisfied.
In the second case, the password has two issues – it's more than 12 characters long, and it doesn't contain at least one digit.
Point Value: 5
Time Limit: 2.00s
Memory Limit: 16M
Added: Mar 23, 2018
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3