parent
2805c3ae78
commit
2f52587ab8
1 changed files with 11 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||||||
|
pairs = [[[int(n) for n in m.split("-")] for m in l.split(",")] for l in [i for i in open("input.txt", 'r').read().splitlines()]] |
||||||
|
|
||||||
|
sum = 0 |
||||||
|
|
||||||
|
for p in pairs: |
||||||
|
if p[0][0] <= p[1][0] and p[0][1] >= p[1][1]: |
||||||
|
sum += 1 |
||||||
|
elif p[0][0] >= p[1][0] and p[0][1] <= p[1][1]: |
||||||
|
sum += 1 |
||||||
|
|
||||||
|
print(sum) |
Loading…
Reference in new issue