Пример #1
0
        public override int GetHashCode()
        {
            var otherNumbersHashCodes = otherNumbers?.Aggregate(HashCode.Combine) ?? 0;
            var numbersHashCode       = Numbers?.Aggregate(HashCode.Combine) ?? 0;

            return(HashCode.Combine(otherNumbersHashCodes, numbersHashCode));
        }
Пример #2
0
        private static ulong Solution()
        {
            var sum = Numbers.Aggregate(new IntX(0), (s, x) => s + x);

            return(Convert.ToUInt64(sum.ToString().Truncate(10)));
        }