static void Part1(Cups cups) { for (int i = 0; i < 100; ++i) { cups.Move(); } // zero based indexing Cup one = cups.Find(0); Console.WriteLine("Part 1: {0}", string.Join("", one.Labels().Select(label => label + 1).Skip(1))); }
static void Part2(Cups cups) { for (int i = 0; i < 10000000; ++i) { cups.Move(); } Cup one = cups.Find(0); long next0 = one.Next.Label + 1; long next1 = one.Next.Next.Label + 1; Console.WriteLine("Part 2: {0}", next0 * next1); }