/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 21ms 3.406 MiB

Code

import re
def is_valid(password):
  if not re.search("[a-z]", password):
    return False
  if not re.search("[A-Z]", password):
    return False
  if not re.search("[0-9]", password):
    return False
  if not re.search("[!@#$%^&*()]", password):
    return False
  if len(password) < 8:
    return False
 
  return True

T = int(input())
for i in range(T):
 
  password = input()
  valid = is_valid(password)
 
  if valid:
    print("valid")
  else:
    print("invalid")

Information

Submit By
Type
Submission
Problem
P1007 Password Checker
Language
Python 3 (Python 3.12.3)
Submit At
2024-01-03 16:09:32
Judged At
2024-01-03 16:09:32
Judged By
Score
100
Total Time
21ms
Peak Memory
3.406 MiB