示例#1
0
        static void Main(string[] args)
        {
            Stopwatch stopWatch = new Stopwatch();

            stopWatch.Start();
            Console.WriteLine($"\n************** {typeof(Program).Namespace} **************");
            Console.WriteLine("******************************************");

            //List<int> testFreq = GetIntListInput(@"./Data/DayONE_input.txt");
            // int output1 = DayOne.CalibratedFrequency(testFreq);
            // int output2 = DayOne.FirstRepeatFrequency(testFreq);

            //List<string> inputData = GetStrListInput(@"./Data/DayTWO_input.txt");
            //var output1 = DayTwo.Checksum(inputData);
            //var output2 = DayTwo.ScanIds(inputData);

            List <string> inputData = GetStrListInput(@"./Data/DayTHREE_input.txt");
            var           output1   = DayThree.FabricClaims(inputData);

            //string output1 = "nope";
            string output2 = "also nope";

            Console.WriteLine($"part one : {output1}\npart two : {output2}");
            Console.WriteLine("******************************************");
            stopWatch.Stop();
            TimeSpan ts = stopWatch.Elapsed;

            Console.WriteLine($"RunTime > {ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}:{ts.Milliseconds / 10:00}");
            Console.WriteLine("******************************************");
        }
示例#2
0
        private static void ExecuteDayThree()
        {
            List <string> inputLines  = DayThree.ProcessInput();
            int           solutionOne = DayThree.FindPartOneSolution(inputLines);
            double        solutionTwo = DayThree.FindPartTwoSolution(inputLines);

            WriteToConsole(solutionOne, solutionTwo);
        }
示例#3
0
        static void DayThreePartTwo()
        {
            Console.WriteLine("Day 3 Part 2 Output");
            DayThree dayThree = new DayThree();
            int      result   = dayThree.PartTwo();

            Console.WriteLine("Valid Triangles: " + result);
            Console.ReadLine();
        }
示例#4
0
        static void Main(string[] args)
        {
            DayOne day = new DayOne();

            DayTwo two = new DayTwo();

            DayThree three = new DayThree();

            Console.WriteLine(new DayFour().CountValid());
        }
示例#5
0
        static void Main(string[] args)
        {
            Console.WriteLine("What day of the advent calender would you like to solve?");
            int advInt;

            int.TryParse(Console.ReadLine(), out advInt);
            switch (advInt)
            {
            default:
                break;

            case 1:
                DayOne.StartProblem();
                break;

            case 2:
                DayTwo.StartProblem();
                break;

            case 3:
                DayThree.StartProblem();
                break;
            }
        }
示例#6
0
        private static int DayThreeTwo()
        {
            var inp = InputProvider.DayThree();

            return(DayThree.ProblemTwo(inp.Item1, inp.Item2));
        }