Skip to content

Commit 6839616

Browse files
committed
[Day 7] Use eachsplit
1 parent 321ccd6 commit 6839616

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This Julia package contains my solutions for [Advent of Code 2024](https://adven
1616
| 4 | [:white_check_mark:](https://adventofcode.com/2024/day/4) | 1.798 ms | 3.06 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day04.jl) |
1717
| 5 | [:white_check_mark:](https://adventofcode.com/2024/day/5) | 2.104 ms | 1.26 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day05.jl) |
1818
| 6 | [:white_check_mark:](https://adventofcode.com/2024/day/6) | 592.911 ms | 52.99 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day06.jl) |
19-
| 7 | [:white_check_mark:](https://adventofcode.com/2024/day/7) | 218.393 ms | 212.72 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day07.jl) |
19+
| 7 | [:white_check_mark:](https://adventofcode.com/2024/day/7) | 221.356 ms | 212.55 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day07.jl) |
2020
| 8 | [:white_check_mark:](https://adventofcode.com/2024/day/8) | 316.122 μs | 671.41 KiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day08.jl) |
2121
| 9 | [:white_check_mark:](https://adventofcode.com/2024/day/9) | 32.603 ms | 9.58 MiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day09.jl) |
2222
| 10 | [:white_check_mark:](https://adventofcode.com/2024/day/10) | 578.868 μs | 633.67 KiB | [:white_check_mark:](https://github.com/goggle/AdventOfCode2024.jl/blob/main/src/day10.jl) |

src/day07.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function day07(input::String = readInput(joinpath(@__DIR__, "..", "data", "day07
99
end
1010

1111
function parse_input(input)
12-
data = [(x, y) for (x, y) split.(split(rstrip(input), '\n'), ':')]
12+
data = [(x, y) for (x, y) eachsplit.(eachsplit(rstrip(input), '\n'), ':')]
1313
test_values = [parse(Int, x[1]) for x data]
1414
numbers = [parse.(Int, split(lstrip(x[2]))) for x data]
1515
return test_values, numbers

0 commit comments

Comments
 (0)