A03 working

This commit is contained in:
= 2020-11-08 12:40:17 +01:00
parent e59070cff8
commit 678b3e4785
2 changed files with 50009 additions and 9 deletions

File diff suppressed because one or more lines are too long

View File

@ -2,15 +2,16 @@ 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:
index = 0
while index != -1:
index = line.find(' r.', index+1)
if index == -1:
return False
else:
return False
if line[index - 4] == '1' and line[index - 3] == '9':
year = int(line[index - 4:index])
if 1999 >= year >= 1900:
return True
return False
for line in sys.stdin: