예제 #1
0
        public static int SolveForInputs(int first, int second)
        {
            int[] inputs = (int[])Inputs.Clone();
            inputs[1] = first;
            inputs[2] = second;
            var results = IntCode.Execute(inputs);

            return(inputs[0]);
        }
예제 #2
0
        public static IEnumerable <int> Solve()
        {
            var results = IntCode.Execute(ReadInputs().ToArray(), 5);

            return(results);
        }
예제 #3
0
 public static IEnumerable <int> Execute(int[] program, params int[] inputs)
 {
     using var intCode = new IntCode(program, inputs);
     return(intCode.Execute());
 }