示例#1
0
        public string GetAnswerForPart2()
        {
            var inputValues = this.Input.ParseDelimited().ToIntegers().ToArray();

            foreach (var noun in Enumerable.Range(0, 100))
            {
                foreach (var verb in Enumerable.Range(0, 100))
                {
                    int[] memory = new int[inputValues.Length];
                    inputValues.CopyTo(memory, 0);


                    if (Day02.GetAnswerForPart1(memory, noun, verb).Equals(19690720))
                    {
                        return((100 * noun + verb).ToString());
                    }
                }
            }

            return(null);
        }
示例#2
0
 public string GetAnswerForPart1()
 {
     return(Day02.GetAnswerForPart1(this.Input.ParseDelimited().ToIntegers().ToArray(), 12, 02).ToString());
 }