protected override string SolvePartOne() { IntCodePC.Program[1] = 12; IntCodePC.Program[2] = 2; foreach (long _ in IntCodePC.RunProgram()) { } return(IntCodePC.PreviousRunState[0].ToString()); }
protected override string SolvePartOne() { long lastItem = long.MinValue; cpu.ReadyInput(1); foreach (long item in cpu.RunProgram()) { Console.WriteLine(item); lastItem = item; } return(lastItem.ToString()); }