retyped day2, completed days 3 and 4, modified template
This commit is contained in:
13
day4/part1.py
Normal file
13
day4/part1.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from common import Range, parse
|
||||
|
||||
|
||||
def solve(input: list[tuple[Range, Range]]) -> int:
|
||||
return len(list(filter(lambda x: x[0] in x[1] or x[1] in x[0], input)))
|
||||
|
||||
|
||||
def main():
|
||||
print(solve(parse("input")))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user