import solutionfunctions import sys sys.path.append('../../functions') import helperfunctions data = helperfunctions.read_input() fuelcounter = 0 for mass in data: fuelcounter += solutionfunctions.calculate_required_fuel(int(mass)) helperfunctions.write_output(str(fuelcounter)) print(str(fuelcounter))
import solutionfunctions import sys sys.path.append('../../functions') import helperfunctions data_str = helperfunctions.read_input()[0].split(",") data = list(map(lambda x: int(x), data_str)) #Fix the program data[1] = 12 data[2] = 2 # result = solutionfunctions.process_intcode_program(data) helperfunctions.write_output(str(result)) print(result)
def load_memory(): data_str = helperfunctions.read_input()[0].split(",") program = list(map(lambda x: int(x), data_str)) return program