Пример #1
0
        private static void Main(string[] args)
        {
            //Day 1
            Console.WriteLine($"Result Day 1 (Part 1): {Day1.ExecutePart1()}");
            Console.WriteLine($"Result Day 1 (Part 2): {Day1.ExecutePart2()}");

            //Day 2
            Console.WriteLine($"Result Day 2 (Part 1): {Day2.ExecutePart1()}");
            Console.WriteLine($"Result Day 2 (Part 2): {Day2.ExecutePart2(19690720)}");

            //Day 3
            Console.WriteLine($"Result Day 3 (Part 1): {Day3.ExecutePart1()}");
            Console.WriteLine($"Result Day 3 (Part 2): {Day3.ExecutePart2()}");

            //Day 4
            Console.WriteLine($"Result Day 4 (Part 1): {Day4.ExecutePart1(145852, 616942)}");
            Console.WriteLine($"Result Day 4 (Part 2): {Day4.ExecutePart2(145852, 616942, 1)}");

            //Day 5
            Console.WriteLine($"Result Day 5 (Part 1): {Day5.ExecutePart1(1)}");
            Console.WriteLine($"Result Day 5 (Part 2): {Day5.ExecutePart2(5)}");

            //Day 6
            Console.WriteLine($"Result Day 6 (Part 1): {Day6.ExecutePart1()}");
            Console.WriteLine($"Result Day 6 (Part 2): {Day6.ExecutePart2()}");

            //Day 7
            Console.WriteLine($"Result Day 7 (Part 1): {Day7.ExecutePart1()}");
            Console.WriteLine($"Result Day 7 (Part 2): {Day7.ExecutePart2()}");

            //Day 8
            Console.WriteLine($"Result Day 8 (Part 1): {Day8.ExecutePart1()}");
            Console.WriteLine($"Result Day 8 (Part 2): {Day8.ExecutePart2()}");

            //Day 9
            Console.WriteLine($"Result Day 9 (Part 1): {Day9.ExecutePart1()}");
            Console.WriteLine($"Result Day 9 (Part 2): {Day9.ExecutePart2()}");
        }
Пример #2
0
        static private bool LoadPuzzles(string option)
        {
            bool finish = false;

            switch (option)
            {
            case "1":
                Day1 day1 = new Day1();
                day1.Execute();
                break;

            case "2":
                Day2 day2 = new Day2();
                day2.Execute();
                break;

            case "3":
                Day3 day3 = new Day3();
                day3.Execute();
                break;

            case "4":
                Day4 day4 = new Day4();
                day4.Execute();
                break;

            case "5":
                Day5 day5 = new Day5();
                day5.Execute();
                break;

            case "6":
                Day6 day6 = new Day6();
                day6.Execute();
                break;

            case "7":
                Day7 day7 = new Day7();
                day7.Execute();
                break;

            case "8":
                Day8 day8 = new Day8();
                day8.Execute();
                break;

            case "9":
                Day9 day9 = new Day9();
                day9.Execute();
                break;

            case "10":
                Day10 day10 = new Day10();
                day10.Execute();
                break;

            case "11":
                Day11 day11 = new Day11();
                day11.Execute();
                break;

            case "12":
                Day12 day12 = new Day12();
                day12.Execute();
                break;

            case "13":
                Day13 day13 = new Day13();
                day13.Execute();
                break;

            case "14":
                Day14 day14 = new Day14();
                day14.Execute();
                break;

            case "q":
            case "Q":
                finish = true;
                break;
            }
            return(finish);
        }