题解 | #密码验证合格程序#
密码验证合格程序
https://www.nowcoder.com/practice/184edec193864f0985ad2684fbc86841
while True:
try:
string = input()
ll = len(string)
a,b,c,d = 0,0,0,0
flag = True
for s in string:
if s.isdigit():
a = 1
elif s.isupper():
b = 1
elif s.islower():
c = 1
else:
d = 1
for i in range(ll-3):
if string.count(string[i:i+3])>1:
flag = False
if ll>8 and a+b+c+d>=3 and flag==True:
print("OK")
else:
print("NG")
except:
break