当前位置:网站首页>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
边栏推荐
- Mysql ->>符号用法 Json相关
- PHP:Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocat
- Order allocation strategy for instant delivery: from modeling and Optimization - Notes
- 279. perfect square
- Virtual Lab Basic Experiment tutoriel - 4. Diffraction à fente unique
- Review of MySQL (3): query operation
- How to download proxystrike in China
- bilibili视频列表名字太长显示不全的解决方法
- Delivery lead time lightweight estimation practice - Notes
- 即时配送的订单分配策略:从建模和优化-笔记
猜你喜欢

国内如何下载ProxyStrike

Title 54: take 4 ~ 7 bits of an integer a from the right end.

Gospel of audio and video developers, rapid integration of AI dubbing capability

Double non grind one, three side byte, cool. Next time

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

收获满满的下午

Redis(三十二)-用Redis做分布式锁

Basic SQL statement - select (single table query)

How to download Vega in China

How to modify the authorization of sina Weibo for other applications
随机推荐
Review of MySQL (10): three paradigms of database
dumi 搭建文档型博客
Leetcode 474. 一和零
VirtualLab basic experiment tutorial -4 Single slit diffraction
[Huawei cloud stack] [shelf presence] issue 10: difficulties and solutions of it monitoring and diagnosis in the cloud scenario of government enterprise hybrid in the cloud native Era
Regression analysis based on elasticnetcv
C language learning -- data storage in memory
标准库template学习入门原创
2022.6.12-----leetcode. eight hundred and ninety
六石认知学:大脑的显速与潜速
收获满满的下午
C语言学习——数据在内存中的存储
在思科模拟器Cisco Packet Tracer实现自反ACL
论大型政策性银行贷后,如何数字化转型 ?-亿信华辰
GD32F4xx 与符合DLT645的电能表通信_2
How to download Vega in China
Self made calculator (1 realized by Boolean logic operation unit and control unit programming)
间隔两个月,我的第二次上榜纪念日【2022.6.2】
Comparison of disk mapping tools for network disk and object cloud storage management
JS get the start and end dates of this week according to the nth week of the N year