From 7b47337e40672c4c5f12a2773d3888c17237f36a Mon Sep 17 00:00:00 2001 From: Xander Bil Date: Wed, 4 Dec 2024 23:58:20 +0100 Subject: solutions day3 and 4 --- src/day02.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/day02.zig') diff --git a/src/day02.zig b/src/day02.zig index cad2d9d..e87b234 100644 --- a/src/day02.zig +++ b/src/day02.zig @@ -4,7 +4,7 @@ const print = std.debug.print; pub fn solve(part: []u8, buffer: []u8) !void { var lines = std.mem.splitScalar(u8, buffer, '\n'); - if (std.mem.eql(u8, part, "part1")) { + if (std.mem.eql(u8, part, "1")) { try part1(&lines); } else { try part2(&lines); @@ -38,7 +38,7 @@ fn part1(lines: *std.mem.SplitIterator(u8, .scalar)) !void { } } - print("Safe count: {d}\n", .{count}); + print("{d}\n", .{count}); } fn part2(lines: *std.mem.SplitIterator(u8, .scalar)) !void { @@ -87,5 +87,5 @@ fn part2(lines: *std.mem.SplitIterator(u8, .scalar)) !void { } } } - print("Safe count: {d}\n", .{count}); + print("{d}\n", .{count}); } -- cgit v1.2.3