This commit is contained in:
Sebastian Seedorf
2022-12-06 08:41:02 +01:00
parent c3050cb4fe
commit 1b18edd0ba
6 changed files with 570 additions and 2 deletions

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env python3
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"))))
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"))))