static void Main(string[] args) { Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); Console.WriteLine($"\n************** {typeof(Program).Namespace} **************"); Console.WriteLine("******************************************"); //List<int> testFreq = GetIntListInput(@"./Data/DayONE_input.txt"); // int output1 = DayOne.CalibratedFrequency(testFreq); // int output2 = DayOne.FirstRepeatFrequency(testFreq); //List<string> inputData = GetStrListInput(@"./Data/DayTWO_input.txt"); //var output1 = DayTwo.Checksum(inputData); //var output2 = DayTwo.ScanIds(inputData); List <string> inputData = GetStrListInput(@"./Data/DayTHREE_input.txt"); var output1 = DayThree.FabricClaims(inputData); //string output1 = "nope"; string output2 = "also nope"; Console.WriteLine($"part one : {output1}\npart two : {output2}"); Console.WriteLine("******************************************"); stopWatch.Stop(); TimeSpan ts = stopWatch.Elapsed; Console.WriteLine($"RunTime > {ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}:{ts.Milliseconds / 10:00}"); Console.WriteLine("******************************************"); }
private static void ExecuteDayThree() { List <string> inputLines = DayThree.ProcessInput(); int solutionOne = DayThree.FindPartOneSolution(inputLines); double solutionTwo = DayThree.FindPartTwoSolution(inputLines); WriteToConsole(solutionOne, solutionTwo); }
static void DayThreePartTwo() { Console.WriteLine("Day 3 Part 2 Output"); DayThree dayThree = new DayThree(); int result = dayThree.PartTwo(); Console.WriteLine("Valid Triangles: " + result); Console.ReadLine(); }
static void Main(string[] args) { DayOne day = new DayOne(); DayTwo two = new DayTwo(); DayThree three = new DayThree(); Console.WriteLine(new DayFour().CountValid()); }
static void Main(string[] args) { Console.WriteLine("What day of the advent calender would you like to solve?"); int advInt; int.TryParse(Console.ReadLine(), out advInt); switch (advInt) { default: break; case 1: DayOne.StartProblem(); break; case 2: DayTwo.StartProblem(); break; case 3: DayThree.StartProblem(); break; } }
private static int DayThreeTwo() { var inp = InputProvider.DayThree(); return(DayThree.ProblemTwo(inp.Item1, inp.Item2)); }