A03 working
This commit is contained in:
parent
e59070cff8
commit
678b3e4785
File diff suppressed because one or more lines are too long
@ -2,15 +2,16 @@ import sys
|
|||||||
|
|
||||||
|
|
||||||
def is_date_in_line(line):
|
def is_date_in_line(line):
|
||||||
index = line.find(' r.')
|
index = 0
|
||||||
if index != -1 and line[index-4] == '1' and line[index-3] == '9':
|
while index != -1:
|
||||||
year = int(line[index-4:index])
|
index = line.find(' r.', index+1)
|
||||||
if 1999 > year > 1900:
|
if index == -1:
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
return False
|
||||||
else:
|
if line[index - 4] == '1' and line[index - 3] == '9':
|
||||||
return False
|
year = int(line[index - 4:index])
|
||||||
|
if 1999 >= year >= 1900:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
for line in sys.stdin:
|
for line in sys.stdin:
|
||||||
|
Loading…
Reference in New Issue
Block a user