Delete 'run.py'

This commit is contained in:
Veronika Polevara 2023-12-10 22:56:20 +01:00
parent ae09f9c3cf
commit 106eacbd60

44
run.py
View File

@ -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")