private static (int noun, int verb) FindInputs() { List <int> intcode = GetIntCode(); var computer = new IntcodeComputer(intcode); foreach (int noun in Enumerable.Range(0, 100)) { foreach (int verb in Enumerable.Range(0, 100)) { computer.Reset(); computer.Memory[1] = noun; computer.Memory[2] = verb; computer.Compute(); if (computer.Memory[0] == 19690720) { return(noun, verb); } } } throw new Exception("No matching inputs found"); }