/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 25ms 4.07 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:03:45
Judged At
2024-11-11 03:44:36
Judged By
Score
100
Total Time
25ms
Peak Memory
4.07 MiB