/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 19ms 3.551 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
2023-12-31 12:28:12
Judged At
2023-12-31 12:28:12
Judged By
Score
100
Total Time
19ms
Peak Memory
3.551 MiB