From 94eee506bce030b236e47ae2d90a7811d20796b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Wed, 6 Dec 2023 00:57:28 +0100 Subject: =?UTF-8?q?malo=20lep=C5=A1i=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prog/aoc/23/5/1.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prog/aoc/23/5/1.py b/prog/aoc/23/5/1.py index be46b5f..a64ee26 100755 --- a/prog/aoc/23/5/1.py +++ b/prog/aoc/23/5/1.py @@ -44,12 +44,12 @@ for s in seeds: l = get_next_step(l, m) # print("l", l) locations[s] = l -print(min(locations.items(), key=lambda x: x[1])) +print(min(locations.items(), key=lambda x: x[1])[1]) from interval import interval, inf semena = interval() for i in range(len(seeds)//2): semena |= interval([seeds[2*i], seeds[2*i]+seeds[2*i+1]]) -print(semena) +# print(semena) def celoštevilski_komplement(intervala): r = interval() for i in range(len(intervala)): @@ -79,4 +79,4 @@ def go_deeper(m, vhod): return r for i in range(len(maps)): semena = go_deeper(maps[i], semena) -print(semena) +print(semena[0][0]) -- cgit v1.2.3