Zadanie C18

This commit is contained in:
s450026 2020-11-22 19:24:16 +01:00
parent d6e7674841
commit 85d7420722
3 changed files with 15 additions and 0 deletions

13
TaskC18/C18.py Normal file
View File

@ -0,0 +1,13 @@
import re
import sys
def line_contains(line):
return re.match("(^(Mt ([1-9]|[1][0-9]|[2][0-8])))?(^(Mk ([1-9]|[1][0-6])))?(^(Łk ([1-9]|[1][0-9]|[2][0-4])))?(^(J ([1-9]|[1][0-9]|[2][0-2])))?(\, [1-9]?[0-9])", line)
for line in sys.stdin:
if line_contains(line):
print("yes")
else:
print("no")

0
TaskC18/Makefile Normal file
View File

2
TaskC18/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
python3 TaskC18/C18.py "$@"