e
This commit is contained in:
parent
b1e6a2a7f8
commit
53ac53201c
18
TaskE08/run.py
Normal file
18
TaskE08/run.py
Normal file
@ -0,0 +1,18 @@
|
||||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^(hi){2,}\!*$'
|
||||
|
||||
if re.match(pattern, input_string):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
while True:
|
||||
line = input()
|
||||
check_number_divisible_by_5(line)
|
||||
|
||||
except EOFError:
|
||||
pass
|
18
TaskE09/run.py
Normal file
18
TaskE09/run.py
Normal file
@ -0,0 +1,18 @@
|
||||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'.*[A-Z]\d{2}.*'
|
||||
|
||||
if re.match(pattern, input_string):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
while True:
|
||||
line = input()
|
||||
check_number_divisible_by_5(line)
|
||||
|
||||
except EOFError:
|
||||
pass
|
18
TaskE12/run.py
Normal file
18
TaskE12/run.py
Normal file
@ -0,0 +1,18 @@
|
||||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^(?!1-500-56773-4323)\d-\d{3}-\d{5}-\d{4}$'
|
||||
|
||||
if re.match(pattern, input_string):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
while True:
|
||||
line = input()
|
||||
check_number_divisible_by_5(line)
|
||||
|
||||
except EOFError:
|
||||
pass
|
18
TaskE19/run.py
Normal file
18
TaskE19/run.py
Normal file
@ -0,0 +1,18 @@
|
||||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^1(00)+$'
|
||||
|
||||
if re.match(pattern, input_string):
|
||||
print('yes')
|
||||
else:
|
||||
print('no')
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
while True:
|
||||
line = input()
|
||||
check_number_divisible_by_5(line)
|
||||
|
||||
except EOFError:
|
||||
pass
|
Loading…
Reference in New Issue
Block a user