This commit is contained in:
thedevone 2023-12-05 09:27:53 +05:30
parent 88c338c73b
commit 018ebf6eaa
2 changed files with 1020 additions and 0 deletions

20
day1a/__main__.py Normal file
View file

@ -0,0 +1,20 @@
with open("./day1a/inputs.txt", "r") as file:
inputs = file.read().strip().split()
value = sum(
map(
lambda nums: int(
"".join([nums[0], nums[-1]]),
)
if len(nums) >= 2
else int(
"".join(nums * 2),
),
map(
lambda text: [c for c in text if c.isdigit()],
inputs,
),
)
)
print(f"{value=}")

1000
day1a/inputs.txt Normal file

File diff suppressed because it is too large Load diff