static Object PartA()
        {
            List <int> input = ReadInputs.ReadInts(inputPath);
            int        ans   = 0;

            Console.WriteLine("Part A: Result is {0}", ans);
            return(ans);
        }
Beispiel #2
0
        static Object PartA()
        {
            List <int> input = ReadInputs.ReadInts(inputPath);

            input.Sort();
            int ans = 0;

            foreach (int a in input)
            {
                int b = 2020 - a;
                if (input.Contains(b))
                {
                    ans = a * b;
                    break;
                }
            }
            Console.WriteLine("Part A: Result is {0}", ans);
            return(ans);
        }