public void Task1_Element() { var stringInput = @"mask = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X mem[8] = 11 mem[7] = 101 mem[8] = 0"; var number = Puzzle14.Task1(stringInput.ToPuzzle14Input()); Assert.Equal(165, number); }
private static void Main(string[] args) { var watch = System.Diagnostics.Stopwatch.StartNew(); var result1 = Puzzle14.Task1(PuzzleInput.ToPuzzle14Input()); watch.Stop(); var elapsedMs = watch.Elapsed; Console.WriteLine($"Element: {result1} (elapsed: {elapsedMs})"); watch = System.Diagnostics.Stopwatch.StartNew(); var result2 = Puzzle14.Task2(PuzzleInput.ToPuzzle14Input()); watch.Stop(); elapsedMs = watch.Elapsed; Console.WriteLine($"Element: {result2} (elapsed: {elapsedMs})"); }