You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
332 B
10 lines
332 B
lines = open("input.txt", "r").read().splitlines()
|
|
contains = 0
|
|
for line in lines:
|
|
lots = [int(i) for i in line.replace(",", "-").split("-")]
|
|
if (lots[0] >= lots[2]) and (lots[1] <= lots[3]):
|
|
contains = contains + 1
|
|
elif lots[0] <= lots[2] and lots[1] >= lots[3]:
|
|
contains = contains + 1
|
|
print(contains)
|