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());
            }
        }
    }
    
  • 相关阅读:
    reference and value type
    搭建基于虚拟机的Windows内核模式调式环境
    C#即时编译器技术测试
    记事本终结者
    实现C#即时编译器
    参数修饰符 params、 out、ref
    重定向Console输出到文本框
    自动属性,对象初始化器,集合初始化器和lambda表达式
    手工搭建32位汇编语言程序开发环境
    匿名方法 Anonymouse Method
  • 原文地址:https://www.cnblogs.com/AWCXV/p/10492423.html
Copyright © 2011-2022 走看看