advent-of-code-2022/src/main.zig

23 lines
479 B
Zig
Raw Normal View History

2022-12-01 17:46:44 +00:00
const std = @import("std");
2022-12-01 18:13:35 +00:00
const day01 = @import("day01.zig");
2022-12-01 17:46:44 +00:00
2022-12-01 18:13:35 +00:00
pub fn main() !void {
2022-12-01 17:46:44 +00:00
const stdout_file = std.io.getStdOut().writer();
var bw = std.io.bufferedWriter(stdout_file);
const stdout = bw.writer();
2022-12-01 19:20:25 +00:00
try stdout.print("Day 1\nPart 1: {}\nPart 2: {}\n\n", .{
try day01.solve_part1("input/day01.txt"),
try day01.solve_part2("input/day01.txt"),
});
2022-12-01 17:46:44 +00:00
2022-12-01 18:13:35 +00:00
try bw.flush();
2022-12-01 17:46:44 +00:00
}
2022-12-01 18:13:35 +00:00
test {
std.testing.refAllDecls(@This());
_ = day01;
2022-12-01 17:46:44 +00:00
}