From 9bdcd2cc34c0ab85fb95e3f07d96075ec061a555 Mon Sep 17 00:00:00 2001 From: Rasmus Malver Date: Fri, 2 Dec 2022 19:58:12 +0100 Subject: [PATCH] =?UTF-8?q?Hack=20l=C3=B8sning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 01/2022-12-01-A.py | 0 01/2022-12-01-B.py | 0 01/2022-12-01-golf.py | 0 02/2022-12-02-A.py | 6 ++++++ 4 files changed, 6 insertions(+) mode change 100644 => 100755 01/2022-12-01-A.py mode change 100644 => 100755 01/2022-12-01-B.py mode change 100644 => 100755 01/2022-12-01-golf.py create mode 100644 02/2022-12-02-A.py diff --git a/01/2022-12-01-A.py b/01/2022-12-01-A.py old mode 100644 new mode 100755 diff --git a/01/2022-12-01-B.py b/01/2022-12-01-B.py old mode 100644 new mode 100755 diff --git a/01/2022-12-01-golf.py b/01/2022-12-01-golf.py old mode 100644 new mode 100755 diff --git a/02/2022-12-02-A.py b/02/2022-12-02-A.py new file mode 100644 index 0000000..1213f0c --- /dev/null +++ b/02/2022-12-02-A.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +scores = [{"A X":4,"A Y":8,"A Z":3,"B X":1,"B Y":5,"B Z":9,"C X":7,"C Y":2,"C Z":6}, {"A X":3,"A Y":4,"A Z":8,"B X":1,"B Y":5,"B Z":9,"C X":2,"C Y":6,"C Z":7}] + +print([sum([i[x] for x in open("02/input.txt").read().split("\n")]) for i in scores]) +