This commit is contained in:
= 2020-11-08 11:55:46 +01:00
parent aa926375ab
commit e59070cff8
3 changed files with 22 additions and 0 deletions

0
TaskA03/Makefile Normal file
View File

2
TaskA03/run Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
python TaskA03/run.py "$@"

20
TaskA03/run.py Normal file
View File

@ -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'))