Day 04 (minified)

This commit is contained in:
Sebastian Seedorf
2022-12-05 10:42:53 +01:00
parent b4fe10e101
commit c3050cb4fe
4 changed files with 9 additions and 2 deletions

3
day04/part1.min.py Normal file
View File

@@ -0,0 +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"))))