Skip to content
Onsite

Strong Password Check

EasyP3Coding

A password is strong if it contains at least one of the characters @, #, $, & or *. Return the exact text strong if s has one, and weak otherwise.

Example 1

Input
s = "abc@123"
Output
"strong"

Example 2

Input
s = "password"
Output
"weak"

Example 3

Input
s = ""
Output
"weak"

Constraints

  • 0 <= s.length <= 10^5
  • s contains printable ASCII characters.

Hints

Run checks the 3 visible tests, Submit all 12.