Zadanie C38

This commit is contained in:
s450026 2020-11-22 20:23:56 +01:00
parent 85d7420722
commit a26aa0ddff
3 changed files with 16 additions and 0 deletions

14
TaskC38/C38.py Normal file
View File

@ -0,0 +1,14 @@
import re
import sys
def line_contains(line):
if re.match("(^(al\.|os\.) ([A-Z].*) ([1-9](\d+)?)((\/\d+)|( m. [1-9])))|(^(ul\.) ([A-Z].*) ([1-9](\d+)?))", line):
return re.findall("^(al\.|os\.|ul\.) ([A-Z][.\S]*) ([1-9](\d+)?)", line)[0][2]
for line in sys.stdin:
if line_contains(line):
print(line_contains(line))
else:
print("<NONE>")

0
TaskC38/Makefile Normal file
View File

2
TaskC38/run Executable file
View File

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