01020304050607080910111213141516171819202122232425

Advent of Code

2019/5

Sunny with a Chance of Asteroids

in C#

by encse

You're starting to sweat as the ship makes its way toward Mercury. The Elves suggest that you get the air conditioner working by upgrading your ship computer to support the Thermal Environment Supervision Terminal.

The Thermal Environment Supervision Terminal (TEST) starts by running a diagnostic program (your puzzle input). The TEST diagnostic program will run on your existing Intcode computer after a few modifications:

Read the full puzzle.

using System.Linq;

namespace AdventOfCode.Y2019.Day05;

[ProblemName("Sunny with a Chance of Asteroids")]
class Solution : Solver {

    public object PartOne(string input) => new IntCodeMachine(input).Run(1).Last();

    public object PartTwo(string input) => new IntCodeMachine(input).Run(5).Last();

}

Please ☆ my repo if you like it!

© 2025 Advent of Code is a registered trademark in the US Images provided by Bing image creator