zoukankan      html  css  js  c++  java
  • 【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());
            }
        }
    }
    
  • 相关阅读:
    将word转化为swf 进行如同百度文库的般阅读
    最大子数组问题——编程珠玑第八章
    为什么静态成员必须在类外初始化
    C++初始化列表
    异步消息总线hornetq学习-03客户端连接hornet进行jms消息的收发-非jndi方式连接
    [PLL][PM]锁相环模拟相位解调
    insertion sort
    SRM 581 D2 L2:SurveillanceSystem,重叠度
    JQuery(下)
    Ajax
  • 原文地址:https://www.cnblogs.com/AWCXV/p/10492423.html
Copyright © 2011-2022 走看看