• edited by
86 views
0 0 votes
 

Password Strength

Let us say a password is strong if it contains a lowercase alphabet, an uppercase alphabet, a number, and a special character from ∵ , ',' '<', '=', >', '?', or '@' (ASCII $58-64$). For instance, the password "qwerty$123$" is not strong, while the string "@bC6ef" is indeed strong.

Write a program that reads a string of characters of length at most $64$ characters from standard input and outputs "$1$" to standard output if the given string qualifies as a strong password, and outputs "$0$" to standard output otherwise.

Sample Input 1

qwerty123

Sample output 1

0

Explanation

Checks the four conditions for a strong password.

The following test case is one of the actual test cases of this question that may be used to evaluate your submission.

Sample input 2

@bC6ef

Sample output 2

1

Note: Your code must be able to print the sample output from the provided sample input. However, your code is run against multiple hidden test cases. Therefore, your code must pass these hidden test cases to solve the problem statement.

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
0 0 answers
122
122 views
Shubham Sharma 2 asked Nov 30, 2025
122 views
Raju's GATE coaching adventuresRaju is preparing for GATE to join IISc. He has joined Mogambo's GATE coaching institute that has given him several chapters of notes to st...
0 0 votes
0 0 answers
121
121 views
Shubham Sharma 2 asked Nov 30, 2025
121 views
Median of a listYou are given a large list of integers (you don't know the size of the list a priori). The integers are given to you one at a time, each on a single line,...
0 0 votes
0 0 answers
93
93 views
Shubham Sharma 2 asked Nov 30, 2025
93 views
What is the sum of diagonal elements of the matrix $\left(\begin{array}{cc}1 & -1 \\ -1 & -1\end{array}\right)^{10}$?$0$$32$$64$$128$
0 0 votes
0 0 answers
115
115 views
Shubham Sharma 2 asked Nov 30, 2025
115 views
The plot of $y=x^{2} \sin (2 x)$ isABCDNone of the Above