Skip to content

dplopezsioux/Broken-Strings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1840Broken-Strings

https://coj.uci.cu/24h/problem.xhtml?pid=1840

Description Many security systems are based on character codes (passwords) provided by users. And this is the case of the company BWALL SECURE SYSTEMS, whose users have grown considerably. However, there is a security flaw in the last module released which is very worrying. A new virus called BROKEN, take advantage of specific characteristics of some passwords to access restricted data.

The password consist of a string consisting only of capital letters between 'A' and 'Z'. If in this password are the same amount of letters 'B', 'R', 'O', 'K', 'E' and 'N', then the password is not secure and the virus BROKEN may access and potentially destroy information of users. Can you develop a module that allows to check if a password is safe or not? Input specification First line contains an integer 1 <= T <= 1000 which is the number of test cases. Following this T-cases exist. Each test case consist of an string of 1 <= N <= 100 characters at most, on a line by itself denoting the password. Output specification For each test case output a single line with one of the following two sentences: "Secure" (no quotes) if the password selected is secure. "No Secure" (no quotes) otherwise. Sample input 3 PASSWORDSECURE BLUEWORKING SECUREWORD Sample output Secure No Secure Secure