Added template (see 2022) + Day 2 completed
This commit is contained in:
14
day2/part1.py
Executable file
14
day2/part1.py
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
from common import ReportList, is_safe, parse
|
||||
|
||||
|
||||
def solve(input: ReportList) -> int:
|
||||
return len(list(filter(is_safe, input)))
|
||||
|
||||
|
||||
def main():
|
||||
print(solve(parse("input")))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user