示例#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());
        }
示例#2
0
        public static string OutputSecond()
        {
            var sample    = Helpers.ReadFile("Inputs\\04.txt");
            var passports = ParsePassports(sample);

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

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