From 2e63e7e82c07b4de75a984964a1335c6cf0e607e Mon Sep 17 00:00:00 2001 From: mxsgd Date: Thu, 28 Dec 2023 12:43:08 +0100 Subject: [PATCH] update --- TaskE03/run.py | 9 +++++++++ TaskE20/run.py | 9 +++++++++ TaskE42/run.py | 9 +++++++++ TaskE48/run.py | 9 +++++++++ 4 files changed, 36 insertions(+) create mode 100644 TaskE03/run.py create mode 100644 TaskE20/run.py create mode 100644 TaskE42/run.py create mode 100644 TaskE48/run.py diff --git a/TaskE03/run.py b/TaskE03/run.py new file mode 100644 index 0000000..14be7a5 --- /dev/null +++ b/TaskE03/run.py @@ -0,0 +1,9 @@ +import sys +import re + +for line in sys.stdin: + numbers = re.fullmatch(r"(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3})", line.replace("\n", ""), flags=re.IGNORECASE) + if numbers: + print("yes") + else: + print("no") \ No newline at end of file diff --git a/TaskE20/run.py b/TaskE20/run.py new file mode 100644 index 0000000..8f75f31 --- /dev/null +++ b/TaskE20/run.py @@ -0,0 +1,9 @@ +import sys +import re + +for line in sys.stdin: + numbers = re.match(r'^(0?[0-9]{2}) (\d{1}-\d{3}-\d{3})$', line.replace("\n", ""), flags=re.IGNORECASE) + if numbers: + print(numbers) + else: + print("") \ No newline at end of file diff --git a/TaskE42/run.py b/TaskE42/run.py new file mode 100644 index 0000000..494856c --- /dev/null +++ b/TaskE42/run.py @@ -0,0 +1,9 @@ +import sys +import re + +for line in sys.stdin: + str = re.match(r'(NIE|NO).*[EO]{6,}.*!!!.*', line.replace("\n", ""), flags=re.IGNORECASE) + if str: + print('yes') + else: + print("no") \ No newline at end of file diff --git a/TaskE48/run.py b/TaskE48/run.py new file mode 100644 index 0000000..8bf2db7 --- /dev/null +++ b/TaskE48/run.py @@ -0,0 +1,9 @@ +import sys +import re + +for line in sys.stdin: + numbers = re.match(r'^[a-ząćęłńóśźżA-ZĄĆĘŁŃÓŚŹŻ]([a-zA-ZąćęłńóśźżĄĆĘŁŃÓŚŹŻ]*[a-zA-ZąćęłńóśźżĄĆĘŁŃÓŚŹŻ])?$', line.replace("\n", ""), flags=re.IGNORECASE) + if numbers: + print('yes') + else: + print("no") \ No newline at end of file