/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 25ms 4.102 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:27:51
Judged At
2024-11-11 03:46:51
Judged By
Score
100
Total Time
25ms
Peak Memory
4.102 MiB