initial commit
This commit is contained in:
commit
27fe77bbe1
134 changed files with 21939 additions and 0 deletions
6
2022/Day1/Day1.py
Normal file
6
2022/Day1/Day1.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
if __name__ == '__main__':
|
||||
with open("input.txt", "r") as f:
|
||||
weights = [sum([int(i) for i in nums.split("\n")]) for nums in f.read().split("\n\n")]
|
||||
|
||||
print(f"Solution 1: {max(weights)}")
|
||||
print(f"Solution 2: {sum(sorted(weights)[-3:])}")
|
||||
2256
2022/Day1/input.txt
Normal file
2256
2022/Day1/input.txt
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue