Ejemplo n.º 1
0
        public string PartOne()
        {
            var game   = new CrabCups(_cups);
            var result = game.Play(100);

            return(string.Concat(result.Skip(1).Select(x => x.ToString())));
        }
Ejemplo n.º 2
0
        public long PartTwo()
        {
            var cups   = _cups.Concat(Enumerable.Range(1, 1_000_000).SkipWhile(n => n < 10));
            var game   = new CrabCups(cups);
            var result = game.Play(10_000_000);

            return(result.Skip(1).Take(2).Select(x => (long)x).Product());
        }