Open jmpark0118 opened 3 years ago
import re
if __name__ == '__main__':
for _ in range(int(input())):
uid = input()
if re.match(r'[a-zA-Z0-9]{10}', uid) is None:
print("Invalid")
elif len(list(uid)) != len(set(list(uid))):
print("Invalid")
else:
step1 = len(re.findall(r'[A-Z]', uid))
step2 = re.findall(r'[0-9]', uid)
if step1 >= 2 and len(step2) >= 3:
print("Valid")
else:
print("Invalid")
출처 : https://www.hackerrank.com/challenges/validating-uid/problem