Day 04 (minified)
This commit is contained in:
@@ -7,4 +7,5 @@ for line in lines:
|
||||
a, b, x, y = map(int, line.replace(',', '-').split('-'))
|
||||
s += 1 if b >= x <= a <= y >= b or y >= a <= x <= b >= y else 0
|
||||
|
||||
print(s)
|
||||
print(s)
|
||||
print(sum(b >= x <= a <= y >= b or y >= a <= x <= b >= y for a, b, x, y in (map(int, l.strip().replace(',', '-').split('-')) for l in open("input.txt"))))
|
||||
|
||||
Reference in New Issue
Block a user