chore: setup for day 18

This commit is contained in:
Stevan Freeborn
2024-12-17 23:48:25 -06:00
parent 3d29524ad4
commit 24c7bbaaa0
5 changed files with 107 additions and 2 deletions
+24 -2
View File
@@ -1,2 +1,24 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
using System.Diagnostics;
if (args.Length is 0)
{
Console.WriteLine("Please provide a path to the input file.");
return;
}
if (File.Exists(args[0]) is false)
{
Console.WriteLine("The provided file does not exist.");
return;
}
var isPart2 = args.Length is 2 && args[1] is "part2";
var input = await File.ReadAllLinesAsync(args[0]);
var stopwatch = new Stopwatch();
stopwatch.Start();
// TODO: Implement solution
stopwatch.Stop();
Console.WriteLine($". ({stopwatch.ElapsedMilliseconds}ms)");