diff --git a/TaskA03/Makefile b/TaskA03/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/TaskA03/run b/TaskA03/run new file mode 100644 index 0000000..89c3eac --- /dev/null +++ b/TaskA03/run @@ -0,0 +1,2 @@ +#!/bin/bash +python TaskA03/run.py "$@" \ No newline at end of file diff --git a/TaskA03/run.py b/TaskA03/run.py new file mode 100644 index 0000000..6bff027 --- /dev/null +++ b/TaskA03/run.py @@ -0,0 +1,20 @@ +import sys + + +def is_date_in_line(line): + index = line.find(' r.') + if index != -1 and line[index-4] == '1' and line[index-3] == '9': + year = int(line[index-4:index]) + if 1999 > year > 1900: + return True + else: + return False + else: + return False + + +for line in sys.stdin: + if is_date_in_line(line): + print(line.rstrip('\n')) + +