Пример #1
0
        private static void RunDay03()
        {
            var input = 289326;


            var day3   = new Day03();
            var matrix = day3.CreateSpiralMatrix(input);
            var steps  = day3.ComputeSteps(matrix, input);

            Console.WriteLine($"Value {input} takes {steps} steps.");


            matrix = day3.CreateZeroMatrix(input);

            int size = (int)Math.Round(Math.Sqrt(input)) + 1;

            var computedValue = day3.FillWithAdjacentValuesAndCompute(matrix, size, input);

            Console.WriteLine($"First value written larger then {input} is {computedValue}");
        }