Compare commits
2 Commits
f3924b4961
...
b1e6a2a7f8
Author | SHA1 | Date |
---|---|---|
Pawel Felcyn | b1e6a2a7f8 | |
Pawel Felcyn | 9e915b26ba |
|
@ -0,0 +1,18 @@
|
|||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^(5|0|[1-9][0-9]*[05])$'
|
||||
|
||||
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
|
|
@ -0,0 +1,18 @@
|
|||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^(0|25|50|75|[1-9][0-9]*(25|00|50|75))$'
|
||||
|
||||
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
|
|
@ -0,0 +1,18 @@
|
|||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^(\d{3}-\d{3}-\d{2}-\d{2}|\d{3}\d{2}-\d{2}-\d{3})$'
|
||||
|
||||
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
|
|
@ -0,0 +1,18 @@
|
|||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^555(-\d{3}-\d{3}| \d{3} \d{3})$'
|
||||
|
||||
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
|
|
@ -0,0 +1,18 @@
|
|||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^(PCMCIA|WYSIWYG|[A-Z]{2,5})$'
|
||||
|
||||
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
|
|
@ -0,0 +1,18 @@
|
|||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^[1-9]\d{4,5}$'
|
||||
|
||||
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
|
|
@ -0,0 +1,18 @@
|
|||
import re
|
||||
|
||||
def check_number_divisible_by_5(input_string):
|
||||
pattern = r'^\*+$'
|
||||
|
||||
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