From 645bf066b803f6a5b62aba177f792269b92e5377 Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Tue, 3 Dec 2024 03:53:49 -0500 Subject: prep --- 2024/tcl/01.tcl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '2024/tcl/01.tcl') diff --git a/2024/tcl/01.tcl b/2024/tcl/01.tcl index 2248e11..bf7e82f 100755 --- a/2024/tcl/01.tcl +++ b/2024/tcl/01.tcl @@ -5,7 +5,7 @@ setup 1 puts {Part 1: Find the sum of distances between pairs of numbers with the same ordinal in each list.} -while {[gets $input line] != -1} { +foreach line $input { lassign $line ln rn lappend left_nums $ln @@ -14,8 +14,6 @@ while {[gets $input line] != -1} { dict incr right_num_counts $rn } -close $input - set left_nums [lsort -integer $left_nums] set right_nums [lsort -integer $right_nums] -- cgit v1.2.3-70-g09d2