Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- String s = in.nextLine();
- int countBig = 0;
- int countSmall = 0;
- int countDigit = 0;
- if (s.length() < 8)
- System.out.print("NO");
- else {
- for (int i = 0; i < s.length(); i++) {
- if (Character.isLetter(s.charAt(i)))
- {
- if (Character.isUpperCase(s.charAt(i)))
- countBig++;
- else
- countSmall++;
- }
- if (Character.isDigit(s.charAt(i)))
- countDigit++;
- }
- if (countBig > 0 && countSmall > 0 && countDigit > 0)
- System.out.print("YES");
- else
- System.out.print("NO");
- }
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement