static void Main(string[] args)
 {
     Console.WriteLine("Day1\n{0} {1}", Day1.Part1(), Day1.Part2());
     Console.WriteLine("Day2\n{0} {1}", Day2.Part1(), Day2.Part2());
     Console.WriteLine("Day3\n{0} {1}", Day3.Part1(), Day3.Part2());
     Console.WriteLine("Day4\n{0} {1}", Day4.Part1(), Day4.Part2());
     Console.WriteLine("Day5\n{0} {1}", Day5.Part1(), Day5.Part2());
     Console.WriteLine("Day6\n{0} {1}", Day6.Part1(), Day6.Part2());
     Console.WriteLine("Day7\n{0} {1}", Day7.Part1(), Day7.Part2());
 }
Exemple #2
0
        public static void ResultDay2()
        {
            Console.WriteLine("Day2:");

            int[] intCode = Day2.GetIntCode();
            int[] result  = Day2.ExecuteIntCode(intCode);

            Console.WriteLine("\tPart 1: Le premier nombre est {0}", result[0]);

            intCode = Day2.GetIntCode();
            Tuple <int, int> nounVerb = Day2.GetNounAndVerbForIntCode(intCode, 19690720);
            int noun = nounVerb.Item1;
            int verb = nounVerb.Item2;

            int answer = 100 * nounVerb.Item1 + nounVerb.Item2;

            Console.WriteLine("\tPart 2: Le nom est {0}, le verbe est {1}", noun, verb);
            Console.WriteLine("\tLa réponse est {0}", answer);
        }