Exemple #1
0
        public static string OutputSecond()
        {
            var sample  = Helpers.ReadFile("Inputs\\02.txt");
            var entries = sample.Select(s => SplitEntry(s));

            return(ValidPasswordsInArray(SecondParser, entries).ToString());
        }
Exemple #2
0
        public static string OutputSecond()
        {
            var sample    = Helpers.ReadFile("Inputs\\04.txt");
            var passports = ParsePassports(sample);

            return(passports.Count(p => p.IsValid()).ToString());
        }
Exemple #3
0
        public static string OutputFirst()
        {
            var sample    = Helpers.ReadFile("Inputs\\04.txt");
            var passports = ParsePassports(sample);

            return(passports.Count(p => p.AllRequiredField()).ToString());
        }
Exemple #4
0
 public static string OutputSecond()
 => GetTimeStampingChinese(Helpers.ReadFile("Inputs\\13.txt")[1]).ToString();
Exemple #5
0
 public static string OutputFirst()
 => GetWaitingMinute(Helpers.ReadFile("Inputs\\13.txt")).ToString();
Exemple #6
0
 public static string OutputSecond()
 => GetSeatsOccupiedNew(Helpers.ReadFile("Inputs\\11.txt")).ToString();
Exemple #7
0
 public static string OutputFirst()
 => GetSeatsOccupied(Helpers.ReadFile("Inputs\\11.txt")).ToString();
Exemple #8
0
 public static string OutputSecond()
 => CountEveryoneAnsweredYes(Helpers.ReadFile("Inputs\\06.txt")).ToString();
Exemple #9
0
 public static string OutputFirst()
 => CountAnyoneAnsweredYes(Helpers.ReadFile("Inputs\\06.txt")).ToString();