1-line Linq
\n# Code\ncsharp []\npublic class Solution {\n    public int[] FindXSum(int[] nums, int k, int x) {\n        return Enumerable.Range(0, nums.Length - k + 1).Sel
\n# Code\n```csharp []\npublic class Solution {\n    public int[] FindXSum(int[] nums, int k, int x) {\n        return Enumerable.Range(0, nums.Length - k + 1).Select(i => nums.Skip(i).Take(k).GroupBy(v => v).OrderBy(v => -v.Count()).ThenBy(v => -v.Key).Take(x).Sum(v => v.Key * v.Count())).ToArray();\n    }\n}\n```
['C#']