C#
\n\npublic class Solution \n{\n    public string DigitSum(string s, int k) \n    {\n        while(s.Length > k)\n        {\n            var chunks = s.Select((c
\n```\npublic class Solution \n{\n    public string DigitSum(string s, int k) \n    {\n        while(s.Length > k)\n        {\n            var chunks = s.Select((c, index) => new {c, index})\n                          .GroupBy(x => x.index/k)\n                          .Select(group => group.Select(elem => elem.c))\n                          .Select(chars => new string(chars.ToArray()));\n            s = string.Empty;\n            foreach(string str in chunks)\n            {\n                s = s + str.Sum(c => c - \'0\').ToString();\n            }\n        }\n\n        return s;        \n    }\n}\n```
['C#']