文章

67

粉丝

207

获赞

29

访问

38.2k

头像
安全密码 题解:python第一个
P1660 中南大学机试题
发布于2024年10月2日 15:32
阅读数 225


while True:
    try:
        str = input()
        list1 = list(str)
        if len(list1)<8:
            print("No")
        else:
            countA = 0
            counta = 0
            count0 = 0
            count6 = 0
            for i in range(len(list1)):
                if list1[i]>='A'and list1[i]<='Z':
                    countA += 1
                elif list1[i]>='a' and list1[i]<='z':
                    counta += 1
                elif list1[i]>='0' and list1[i]<='9':
                    count0 += 1
                elif list1[i]=='!' or list1[i]=='^' or list1[i]=='~' or list1[i]=='@' or list1[i] =='%' or list1[i]=='$' or list1[i]=='#' :
                    count6 += 1
            if (countA == 0 and counta ==0)or(countA ==0 and count0==0)or(countA ==0 and count6==0)or(counta ==0 and count0==0)or(counta ==0 and count6==0)or(count0 ==0 and count6==0):
                print("No")
            else:
                print("Yes"...
登录查看完整内容


登录后发布评论

暂无评论,来抢沙发