-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday79.py
More file actions
26 lines (22 loc) · 734 Bytes
/
day79.py
File metadata and controls
26 lines (22 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/python
import sys
def minimumNumber(n, password):
numbers = "0123456789"
lower_case = "abcdefghijklmnopqrstuvwxyz"
upper_case = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
special_characters = "!@#$%^&*()-+"
count = 0
if any(i.isdigit() for i in password) == False:
count += 1
if any(i.islower() for i in password) == False:
count += 1
if any(i.isupper() for i in password) == False:
count += 1
if any(i in special_characters for i in password) == False:
count+=1
return max(count,6-n)
if __name__ == "__main__":
n = int(raw_input().strip())
password = raw_input().strip()
answer = minimumNumber(n, password)
print answer