CF411A.Password Check
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You have probably registered on Internet sites many times. And each time you should enter your invented password. Usually the registration form automatically checks the password's crypt resistance. If the user's password isn't complex enough, a message is displayed. Today your task is to implement such an automatic check.
Web-developers of the company Q assume that a password is complex enough, if it meets all of the following conditions:
- the password length is at least 5 characters;
- the password contains at least one large English letter;
- the password contains at least one small English letter;
- the password contains at least one digit.
You are given a password. Please implement the automatic check of its complexity for company Q.
你可能已经在互联网网站上注册过很多次了。每次注册时,你都需要输入自己设定的密码。通常,注册表单会自动检查密码的加密强度。如果用户的密码不够复杂,系统就会显示一条提示信息。今天你的任务就是实现这样的自动检查功能。
公司 Q 的网页开发者认为,当且仅当密码同时满足以下所有条件时,该密码才被认为足够复杂:
- 密码长度至少为 5 个字符;
- 密码中至少包含一个大写英文字母;
- 密码中至少包含一个小写英文字母;
- 密码中至少包含一个数字。
现给你一个密码,请为公司 Q 实现其复杂度的自动检查。
输入格式
The first line contains a non-empty sequence of characters (at most 100 characters). Each character is either a large English letter, or a small English letter, or a digit, or one of characters: "!", "?", ".", ",", "_".
第一行包含一个非空的字符序列(最多 100 个字符)。每个字符要么是一个大写英文字母,要么是一个小写英文字母,要么是一个数字,要么是以下字符之一:"!"、"?"、"."、","、"_"。
输出格式
If the password is complex enough, print message "Correct" (without the quotes), otherwise print message "Too weak" (without the quotes).
如果密码足够复杂,则输出消息 “Correct”(不带引号),否则输出消息 “Too weak”(不带引号)。
输入输出样例
输入#1
abacaba
输出#1
Too weak
输入#2
X12345
输出#2
Too weak
输入#3
CONTEST_is_STARTED!!11
输出#3
Correct
输入解题思路,AI测评打分。不知道怎么写?