public void Part2() { var computer = ComputerPart2.Initialize(@"mask = 000000000000000000000000000000X1001X mem[42] = 100 mask = 00000000000000000000000000000000X0XX mem[26] = 1"); computer.Memory.Values.Sum() .Should().Be(208); }
public void Part2Line1() { var computer = ComputerPart2.Initialize(@"mask = 000000000000000000000000000000X1001X mem[42] = 100"); computer.Memory.Should().BeEquivalentTo( new Dictionary <long, long> { [26] = 100, [27] = 100, [58] = 100, [59] = 100, }); }
public void Part2Line2() { var computer = ComputerPart2.Initialize(@"mask = 00000000000000000000000000000000X0XX mem[26] = 1"); computer.Memory.Should().BeEquivalentTo( new Dictionary <long, long> { [16] = 1, [17] = 1, [18] = 1, [19] = 1, [24] = 1, [25] = 1, [26] = 1, [27] = 1 }); }