summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsn <mail@mhsn.net>2025-12-23 20:38:31 +0000
committermhsn <mail@mhsn.net>2025-12-23 20:50:16 +0000
commit4d3fc54257fd198439c376eaab6b4e558c91bdcb (patch)
treee292e0c88bb2a5fa7b8d5bffe3295366f774bace
parent5e588a11e5d54c65f644f837b9aa38475f518b39 (diff)
downloadaoc-master.tar.gz
aoc-master.zip
25-09 python p1HEADmaster
-rwxr-xr-x2025/09/python.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/2025/09/python.py b/2025/09/python.py
new file mode 100755
index 0000000..6c4df6c
--- /dev/null
+++ b/2025/09/python.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python3
+
+from fileinput import input
+
+pts = [[*map(int, line.split(","))] for line in input()]
+
+silver = max(
+ (abs(x1 - x2) + 1) * (abs(y1 - y2) + 1) for (x1, y1) in pts for (x2, y2) in pts
+)
+gold = 0
+
+print("silver:", silver)
+print("gold:", gold)