예제 #1
0
        public int Solution(string input)
        {
            List <Instruction> instructions = instructionsRepository.GetInstructions(input);
            int accumulatorValue            = accumulator.CalculateAccumulatorValueAfterProgramTerminates(instructions);

            return(accumulatorValue);
        }
예제 #2
0
        public int Solution(string input)
        {
            List <Instruction> instructions = instructionsRepository.GetInstructions(input);
            int accumulatorValue            =
                accumulator.CalculateAccumulatorValueBeforeAnyInstructionIsExecutedSecondTime(instructions);

            return(accumulatorValue);
        }