while True: try: password=input().strip('\n') score=0 if len(password)<=4: score=score+5 elif len(password)<8: score=score+10 else: score=score+25 big_letter,small_letter,num,sign,flag=False,False,0,0,0 a=[0,25,50,60,70,80,90]#表示条件变化时满足的最低数值 b=['VERY_WEAK','WEAK','AVERAGE','STRONG','VERY_STRONG','SECURE','VERY_SECURE']#表示结果 point=[0,0,2,3,5]#index表示满足奖励的元素个数,数值表示得到的奖励 for i in range(0,len(password)): if ord(password[i])>=ord('0') and ord(password[i])<=ord('9'): num=num+1 elif ord(password[i])>=ord('a') and ord(password[i])<=ord('z'): small_letter=True elif ord(password[i])>=ord('A') and ord(password[i])<=ord('Z'): big_letter=True else: sign=sign+1 if num==1: score=score+10 flag=flag+1 elif num>1: score=score+20 flag=flag+1 if sign==1: score=score+10 flag=flag+1 elif sign>1: score=score+25 flag=flag+1 if small_letter==True: flag=flag+1 score=score+10 if big_letter==True: flag=flag+1 score=score+10 score=score+point[flag] #运用了数组简化判断条件 for i in range(0,len(a)): if score<a[i]: print(b[i-1]) break if i==len(a)-1: print(b[i]) except: break