【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());
}
}
}
【Codeforces 411A】Password Check的更多相关文章
- 【Codeforces 126B】Password
[链接] 我是链接,点我呀:) [题意] 给你一个字符串s 让你从中选出来一个字符串t 这个字符串t是s的前缀和后缀 且在除了前缀和后缀之外的中间部位出现过. 且要求t的长度最长. 让你输出这个字符串 ...
- 【codeforces 415D】Mashmokh and ACM(普通dp)
[codeforces 415D]Mashmokh and ACM 题意:美丽数列定义:对于数列中的每一个i都满足:arr[i+1]%arr[i]==0 输入n,k(1<=n,k<=200 ...
- 【牛刀小试2】password保
]password保 主要知识: 1. while循环 2. do-while循环 3. if-else 4. strcmp()函数 [充电一下 ...
- 【codeforces 761C】Dasha and Password(动态规划做法)
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...
- 【codeforces 761C】Dasha and Password(贪心+枚举做法)
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...
- 【codeforces 508D】Tanya and Password
[题目链接]:http://codeforces.com/problemset/problem/508/D [题意] 给你一个字符的所有连续3个的子串; 让你复原出原串; (包含小写.大写字母以及数字 ...
- 【codeforces 767D】Cartons of milk
[题目链接]:http://codeforces.com/problemset/problem/767/D [题意] 每个牛奶都有最晚可以喝的时间; 每天喝K瓶牛奶; 你有n瓶牛奶->已知每个牛 ...
- 【codeforces 807D】Dynamic Problem Scoring
[题目链接]:http://codeforces.com/contest/807/problem/D [题意] 给出n个人的比赛信息; 5道题 每道题,或是没被解决->用-1表示; 或者给出解题 ...
- 【codeforces 379D】New Year Letter
[题目链接]:http://codeforces.com/contest/379/problem/D [题意] 让你构造出两个长度分别为n和m的字符串s[1]和s[2] 然后按照连接的规则,顺序连接s ...
随机推荐
- bzoj 1878: [SDOI2009]HH的项链【树状数组】
对于一个lr,每个颜色贡献的是在(1,r)区间里出现的最右位置,所以记录一个b数组表示当前点这个颜色上一个出现的位置 然后把询问离线,按r升序排序 每次把右端点右移,把这个点在树状数组上+1,并且在当 ...
- gauge自动化测试框架(二)
Gauge通过Markdown来描述行为,所以我还需先学习学习Markdown语法,看了一下,还好,十来分钟应该就可以搞定.具体学习见另一篇文章
- 程序员必知的LinuxShell命令
程序员必知的LinuxShell命令 grep (Globle Regular Expression Print全局正则表达式) 命令是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹 配的 ...
- vuex的各个细节理解(因人而异)
应用级的状态集中放在store中: 改变状态的方式是提交mutations,这是个同步的事物: 异步逻辑应该封装在action中. const vuex_store = new Vuex.store( ...
- DVWA--登录页面错误问题 469 | | PHP Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in C:\web\DVWA\dvwa\includes\dvwaPage.inc.php:469
// MySQL PDO Prepared Statements (for impossible levels) $db = new PDO('mysql:host=' . $_DVWA[ 'db_s ...
- 字符流-缓冲区-自定义myBufferedReader
public class myBufferedReaderDemo { public static void main(String[] arg) throws IOException{ FileRe ...
- HDU_6016_(Bestcoder round #92 1002)_(dfs)(暴力)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6016 题意:给定男羊和女羊的朋友关系,即给定一个图,问从任意一只羊开始连续数四只不相同的羊的方法数. ...
- 安卓app测试之Monkeyrunner
一.MonkeyRunner简介 MonkeyRunner提供了系列的API ,MonkeyRunner可以完成模拟事件及截图操作 ,分为以下三类: MonkeyRunner:用来连接设备或模拟器的 ...
- php中 如何找到session 的保存位置
[前言] 刚刚想测试FQ操作,需要删除session,这里记录分享下 [主体] (1)想要查看session保存的目录,需要先找到 php.ini配置文件 (2)在php.ini文件中查找 sessi ...
- elk大纲
一.ELK功能概览 1.检索 2.数据可视化--实时监控(实时刷新) nginx 访问量 ip地区分布图(大数据) 3.zabbix 微信联动报警 4.大数据日志分析平台(基于hadoop) 二.ka ...