当前位置:网站首页>leetcode:6095. Strong password verifier II [simple simulation + direct false]
leetcode:6095. Strong password verifier II [simple simulation + direct false]
2022-06-12 18:43:00 【Review of the white speed Dragon King】

analysis
Simple simulation
ac code
class Solution:
def strongPasswordCheckerII(self, password: str) -> bool:
if len(password) < 8:
return False
flag1, flag2, flag3, flag4 = False, False, False, False
for c in password:
if c.isdigit():
flag1 = True
elif 'a' <= c <= 'z':
flag2 = True
elif 'A' <= c <= 'Z':
flag3 = True
elif c in '[email protected]#$%^&*()-+':
flag4 = True
if flag1 == False or flag2 == False or flag3 == False or flag4 == False:
return False
for i in range(1, len(password)):
if password[i - 1] == password[i]:
return False
return True
summary
Multi condition judgment
边栏推荐
- Title 66: input 3 numbers a, B, C, and output them in order of size.
- Operational research optimization of meituan intelligent distribution system - Notes
- MySQL数据库(28):变量 variables
- Getting started with the go language is simple: read / write lock
- 快速复制浏览器F12中的请求到Postman/或者生成相关语言的对应代码
- Gd32f4xx communicates with electric energy meter conforming to dlt645_ two
- torch. New usage of where (old but ignored usage)
- liunx部署Seata(Nacos版)
- Vue —— 进阶 vue-router 路由(二)(replace属性、编程式路由导航、缓存路由组件、路由的专属钩子)
- The difference between user status and system status in CRM
猜你喜欢

What is a network proxy

Review of MySQL (3): query operation

leetcode:6096. 咒语和药水的成功对数【排序 + 二分】

VirtualLab basic experiment tutorial -4 Single slit diffraction

Review of MySQL (IX): index

leetcode:6097. 替换字符后匹配【set记录 + 相同长度逐一查询】

MYSQL:Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column

leetcode:6095. 强密码检验器 II【简单模拟 + 不符合直接False】

Review of MySQL (VI): usage of Union and limit

Why my order by create_ Time ASC becomes order by ASC
随机推荐
Kali2022 how to install w3af
实验10 Bezier曲线生成-实验提高-控制点生成B样条曲线
lua记录
Hugo blog building tutorial
Hash hash
Kali implements port forwarding through iptables
Observe the page of the website
wireshark基本使用命令
笔记本电脑清灰打硅脂后,开机一直黑屏,如何破?
Implementing reflexive ACL in Cisco packet tracker
The difference between user status and system status in CRM
Leetcode 474. 一和零
基于STM32设计智能家居控制系统(OneNet)_2022
Virtual Lab Basic Experiment tutoriel - 4. Diffraction à fente unique
leetcode:6095. 强密码检验器 II【简单模拟 + 不符合直接False】
no available service ‘null‘ found, please make sure registry config correct
232-CH579M学习开发-以太网例程-TCP服务器(项目应用封装,局域网或广域网测试)
Order allocation strategy for instant delivery: from modeling and Optimization - Notes
Gospel of audio and video developers, rapid integration of AI dubbing capability
torch.where的新用法(很老但是大家忽略的用法)