public void BasicTests(long[] memory, long input, int expectedDiagnosticCode) { var vm = new AsyncIntCodeVm(memory); long[] output = vm.Execute(input); Assert.That(output.Last(), Is.EqualTo(expectedDiagnosticCode)); }
public string Solve(string data) { var vm = new AsyncIntCodeVm(data); long[] outputs = vm.Execute(1); return(outputs.LastOrDefault().ToString()); }
public string Solve(string data) { var vm = new AsyncIntCodeVm(data); long[] output = vm.Execute(2); return(output.Last().ToString()); }