Ejemplo n.º 1
0
        public string Part1()
        {
            photo = new Photo(Lines);
            photo.Assemble();

            long answer = 1;
            var  result = "Corners = ";

            foreach (var corner in photo.Tiles.Where(i => i.NeighboursPopulated == 2))
            {
                result += $"{corner.ID} x ";
                answer *= corner.ID;
            }

            return(result[0..^ 2] + $"= {answer}");