Delete 'run.py'
This commit is contained in:
parent
ae09f9c3cf
commit
106eacbd60
44
run.py
44
run.py
@ -1,44 +0,0 @@
|
||||
import re
|
||||
import sys
|
||||
|
||||
def check(pin):
|
||||
pattern = r'^\d{6}$'
|
||||
|
||||
if re.match(pattern, pin) :
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def check0(pin):
|
||||
k = 0
|
||||
a = r'^0'
|
||||
b = r'^.{1}0'
|
||||
c = r'^.{2}0'
|
||||
d = r'^.{3}0'
|
||||
e = r'^.{4}0'
|
||||
f = r'^.{5}0'
|
||||
|
||||
|
||||
if re.match(a, pin) :
|
||||
k+=1
|
||||
if re.match(b, pin) :
|
||||
k+=1
|
||||
if re.match(c, pin) :
|
||||
k+=1
|
||||
if re.match(d, pin) :
|
||||
k+=1
|
||||
if re.match(e, pin) :
|
||||
k+=1
|
||||
if re.match(f, pin) :
|
||||
k+=1
|
||||
if k<2:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
for line in sys.stdin:
|
||||
number = line.strip()
|
||||
if check(number) and check0(number):
|
||||
print("yes")
|
||||
else:
|
||||
print("no")
|
Loading…
Reference in New Issue
Block a user