Safe password

Report a typo

The password is hard to crack if it contains at least one uppercase letter, at least one lowercase letter, at least one digit and includes 12 or more symbols. For a given string you should output "YES" if this password is hard to crack, otherwise output "NO".

Note that it's convenient to complete this task by using several separate regexes.

Sample Input 1:

Password1234

Sample Output 1:

YES

Sample Input 2:

SuperSecretPass

Sample Output 2:

NO
Write a program in Java 17
import java.util.Scanner;

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// start coding here
}
}
___

Create a free account to access the full topic