Final polish
This commit is contained in:
parent
e3b4150554
commit
5f61213d21
@ -1,33 +1,5 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
def solve(lines):
|
|
||||||
# from 0 to n-6
|
|
||||||
date_f = "19XX r."
|
|
||||||
date_l = len(date_f)
|
|
||||||
|
|
||||||
res = []
|
|
||||||
for l in lines:
|
|
||||||
# acc = []
|
|
||||||
|
|
||||||
j = 0
|
|
||||||
for i in range(len(l)):
|
|
||||||
c = l[i]
|
|
||||||
|
|
||||||
if j == date_l:
|
|
||||||
# acc.append(l[i-j: i])
|
|
||||||
res.append(l)
|
|
||||||
break
|
|
||||||
elif c == date_f[j] \
|
|
||||||
or (j in (2, 3) and c.isdigit()):
|
|
||||||
j += 1
|
|
||||||
continue
|
|
||||||
|
|
||||||
j = 0
|
|
||||||
|
|
||||||
# res.append(" ".join(acc))
|
|
||||||
# return "\n".join(res)
|
|
||||||
return "".join(res)
|
|
||||||
|
|
||||||
# detect numbers. separate numbers by spaces
|
# detect numbers. separate numbers by spaces
|
||||||
def solve(lines):
|
def solve(lines):
|
||||||
res = []
|
res = []
|
||||||
|
Loading…
Reference in New Issue
Block a user