【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 ...
随机推荐
- 2-4 Vue中的属性绑定和双向数据绑定
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- PCB SI9000阻抗计算引擎Web方式实现方法
在笔者从业这么多年,PCB行业阻抗计算工具都是用Polar公司的阻抗计算工具SI9000,或早期上个版 本SI8000 Prolar是老牌公司,但也不断在推出新的产品,可以进去去了解一下 http ...
- 【知识总结】多项式全家桶(三)(任意模数NTT)
经过两个月的咕咕,"多项式全家桶" 系列终于迎来了第三期--(雾) 上一篇:[知识总结]多项式全家桶(二)(ln和exp) 先膜拜(伏地膜)大恐龙的博客:任意模数 NTT (在页面 ...
- 记录从数据库把数据初始化mongodb缓存的一些坑
在项目启动时,需要做一些项目启动后的预操作,比如初始化数据进缓存等等. 这时就需要写listener,等监听.在项目启动时把数据缓存进mongodb. 但是这会有一个问题.项目一般都是把各种bean交 ...
- linux小白成长之路5————安装Docker
1.安装docker 命令: yum -y install docker   2.启动docker 命令: systemctl start docker.service 3.查看docker版本 ...
- CF814C An impassioned circulation of affection
思路: 对于题目中的一个查询(m, c),枚举子区间[l, r](0 <= l <= r < n),若该区间满足其中的非c字符个数x不超过m,则可以将其合法转换为一个长度为r-l+1 ...
- Python学习日记之练习代码
# -*- coding:utf-8 -*- number = 23 test=True while test: guess=int(raw_input('输入数字')) if guess==numb ...
- Ionic2/angularJs2中的静态类 PhotoLibrary 调用不上
photoLibrary调用报错:No provider for PhotoLibrary: 在调用相册文件时有用到photolibrary,总有些莫名的报错,3月份的时候这个坑让我不知所措,现在写下 ...
- MySQL详解(25)-----------MySQL性能优化
1. 简介 在Web应用程序体系架构中,数据持久层(通常是一个关系数据库)是关键的核心部分,它对系统的性能有非常重要的影响.MySQL是目前使用最多的开源数据库,但是MySQL数据库的默认设置性 ...
- JS高级——监听浏览器的返回事件
https://www.cnblogs.com/Easty/p/7820055.html https://www.cnblogs.com/zhengyan/p/6912526.html http:// ...