コード例 #1
0
        public static int Solve()
        {
            var rules = Problem1.ParseRules(Problem1.Input);

            // for this one we only care about shiny gold bags
            var shinyGold = rules.Single(x => x.Color == TestTargetColor);

            // now we need to recurse down again, counting everything that is required
            var total = CountDependents(shinyGold);

            return(total);
        }