コード例 #1
0
        public void Decompresses_Correctly_OnVeryLongString()
        {
            var input = "(27x12)(20x12)(13x14)(7x10)(1x12)A";

            var actualLength = new StringDecompressorV2().Decompress(input);

            Assert.Equal(241920, actualLength);
        }
コード例 #2
0
        public static void Problem9()
        {
            var strings = FileStringReader.Read("P9.txt");

            var d = new StringDecompressorV2();

            var lengths = strings.Select(a => d.Decompress(a));

            lengths.ToList().ForEach(s => Console.WriteLine("Length = {0}", s));
        }
コード例 #3
0
        public void Decompresses_Correctly(string input, int expected)
        {
            var actualLength = new StringDecompressorV2().Decompress(input);

            Assert.Equal(expected, actualLength);
        }