Пример #1
0
        public int Solution(string input)
        {
            int inputSquare       = inputSquareRepository.GetInputSquare(input);
            int manhattanDistance = spiralMemory.CalculateManhattanDistanceFromSquareToAccessPort(inputSquare);

            return(manhattanDistance);
        }
Пример #2
0
        public int Solution(string input)
        {
            int inputSquare = inputSquareRepository.GetInputSquare(input);
            int firstValueLargerThanInputSquare = spiralMemory.CalculateFirstValueLargerThanInputSquare(inputSquare);

            return(firstValueLargerThanInputSquare);
        }