﻿using System;
using System.Linq;

namespace Problems
{
    public class Problem6 : Problem
    {
        public override double Solve()
        {
            var sqrOfTheSum = Math.Pow(Enumerable.Range(1, 100).Sum(), 2);
            var sumOfSqrs = Enumerable.Range(1, 100).Select(x => Math.Pow(x, 2)).Sum();
            return sqrOfTheSum - sumOfSqrs;
        }
    }
}
