| 1234567891011121314151617181920212223242526 |
- using System.Diagnostics;
- using Day20;
- if (args.Any(a => a == "--debug"))
- {
- Console.WriteLine("DEBUG");
- Console.WriteLine(Debugger.Launch());
- }
- if (args.Length < 1)
- {
- Console.WriteLine("Requires 1 args: inputFileName");
- return -1;
- }
- var inputFile = args[0];
- var parser = new Parser();
- var processor = parser.Parse(inputFile);
- var pulses = processor.Push(1000);
- Console.WriteLine();
- Console.WriteLine($"Pulses: {pulses.High} High & {pulses.Low} Low");
- Console.WriteLine($"Total: {pulses.High * pulses.Low}");
- return 0;
|