当前位置:网站首页>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
边栏推荐
- Problems that the sap Spartacus e-commerce cloud UI shipping method does not display in the unit test environment
- GD32F4xx控制DGUS触控按键
- kali通过iptables实现端口转发功能
- torch. New usage of where (old but ignored usage)
- Redis(三十二)-用Redis做分布式锁
- MySQL - > > symbol usage JSON related
- 【历史上的今天】6 月 12 日:美国进入数字化电视时代;Mozilla 的最初开发者出生;3Com 和美国机器人公司合并
- Use of nexttick function
- leetcode:5289. 公平分发饼干【看数据范围 + dfs剪枝】
- 在思科模擬器Cisco Packet Tracer實現自反ACL
猜你喜欢

Review of MySQL (4): sorting operation

MySQL - > > symbol usage JSON related

The Bean Validation API is on the classpath but no implementation could be found

【0008】无序列表

论大型政策性银行贷后,如何数字化转型 ?-亿信华辰

kali局域网ARP欺骗(arpspoof)并监听(mitmproxy)局域内其它主机上网记录
![[blockbuster release] ant dynamic card, enabling the app home page to realize agile update](/img/65/5ed80090f4d0ee92b01888eb496528.jpg)
[blockbuster release] ant dynamic card, enabling the app home page to realize agile update

leetcode:5289. 公平分发饼干【看数据范围 + dfs剪枝】

Research Report on the overall scale, major manufacturers, major regions, products and applications of Electric Screwdrivers in the global market in 2022

Common methods and examples of defect detection based on Halcon
随机推荐
MySQL - > > symbol usage JSON related
tarfile解压嵌套tar
232-ch579m learning and development Ethernet routine TCP server (project application package, LAN or WAN test)
kali2022如何安装w3af
Title 68: there are n integers, so that the previous numbers are moved backward m positions, and the last m numbers become the first m numbers
笔记本电脑清灰打硅脂后,开机一直黑屏,如何破?
The Bean Validation API is on the classpath but no implementation could be found
Dumi builds a document blog
How to modify the authorization of sina Weibo for other applications
2022.6.12-----leetcode.890
基于halcon—缺陷检测常用方法与示例总结
Order allocation strategy for instant delivery: from modeling and Optimization - Notes
Kali2022 how to install w3af
用一个性能提升了666倍的小案例说明在TiDB中正确使用索引的重要性
【历史上的今天】6 月 12 日:美国进入数字化电视时代;Mozilla 的最初开发者出生;3Com 和美国机器人公司合并
GD32F4xx控制DGUS触控按键
kali通过iptables实现端口转发功能
配送交付时间轻量级预估实践-笔记
国内如何下载Vega
Leetcode 494. 目标和