【Codeforces 411A】Password Check

【链接】 我是链接,点我呀:)
【题意】

题意

【题解】

傻逼模拟题

【代码】

import java.io.*;
import java.util.*;

public class Main {
    
    
    static InputReader in;
    static PrintWriter out;
        
    public static void main(String[] args) throws IOException{
        //InputStream ins = new FileInputStream("E:\\rush.txt");
        InputStream ins = System.in;
        in = new InputReader(ins);
        out = new PrintWriter(System.out);
        //code start from here
        new Task().solve(in, out);
        out.close();
    }
    
    static int N = 50000;
    static class Task{
        
        String s;
        public void solve(InputReader in,PrintWriter out) {
        	s = in.next();
        	if ((int)s.length()<5) {
        		out.println("Too weak");
        		return;
        	}
        	int ok1 = 0;
        	for (int i = 0;i < (int)s.length();i++) {
        		if (s.charAt(i)>='A' && s.charAt(i)<='Z') {
        			ok1 = 1;
        		}
        	}
        	int ok2 = 0;
        	for (int i = 0;i < (int)s.length();i++) {
        		if (s.charAt(i)>='a' && s.charAt(i)<='z') {
        			ok2 = 1;
        		}
        	}
        	int ok3 = 0;
        	for (int i = 0;i < (int)s.length();i++) {
        		if (s.charAt(i)>='0' && s.charAt(i)<='9') {
        			ok3 = 1;
        		}
        	}
        	//out.println(ok1+" "+ok2+" "+ok3);
        	
        	if (ok1==0 || ok2==0 || ok3==0) {
        		out.println("Too weak");
        		return;
        	}
        	out.println("Correct");
        }
    }

    

    static class InputReader{
        public BufferedReader br;
        public StringTokenizer tokenizer;
        
        public InputReader(InputStream ins) {
            br = new BufferedReader(new InputStreamReader(ins));
            tokenizer = null;
        }
        
        public String next(){
            while (tokenizer==null || !tokenizer.hasMoreTokens()) {
                try {
                tokenizer = new StringTokenizer(br.readLine());
                }catch(IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}
posted @ 2019-03-07 21:19  AWCXV  阅读(236)  评论(0编辑  收藏  举报