Esempio n. 1
0
        public void PartOne()
        {
            var sumOfModuleMasses =
                File.ReadAllLines(@"C:\Temp\input.txt")
                .Select(int.Parse)
                .Sum(moduleMass => Day01.GetFuelRequirements(moduleMass));

            Assert.AreEqual(3269199, sumOfModuleMasses);
        }
Esempio n. 2
0
        public void PartTwo()
        {
            var sumOfModuleMasses =
                File.ReadAllLines(@"C:\Temp\input.txt")
                .Select(int.Parse)
                .Sum(_ => Day01.GetFuelRequirements(_, true));

            Assert.AreEqual(4900909, sumOfModuleMasses);
        }
Esempio n. 3
0
 public void Mass_100756_Part_One() => Assert.AreEqual(33583, Day01.GetFuelRequirements(100756));
Esempio n. 4
0
 public void Mass_100756_Part_Two() => Assert.AreEqual(50346, Day01.GetFuelRequirements(100756, true));
Esempio n. 5
0
 public void Mass_1969_Part_Two() => Assert.AreEqual(966, Day01.GetFuelRequirements(1969, true));
Esempio n. 6
0
 public void Mass_1969_Part_One() => Assert.AreEqual(654, Day01.GetFuelRequirements(1969));
Esempio n. 7
0
 public void Mass_14_Part_Two() => Assert.AreEqual(2, Day01.GetFuelRequirements(14, true));
Esempio n. 8
0
 public void Mass_14_Part_One() => Assert.AreEqual(2, Day01.GetFuelRequirements(14));
Esempio n. 9
0
 public void Mass_12() => Assert.AreEqual(2, Day01.GetFuelRequirements(12));