📌Fastest java☕ solution. 0 ms💯
```\nclass Solution {\n    public String digitSum(String s, int k) \n    {\n        while(s.length()>k)\n        {\n            StringBuilder u=new StringBuilde
```\nclass Solution {\n    public String digitSum(String s, int k) \n    {\n        while(s.length()>k)\n        {\n            StringBuilder u=new StringBuilder();\n            for(int i=0;i<s.length();i+=k)\n            {\n                int n=0;\n                for(int j=i;j<i+k && j<s.length(); j++)\n                    n+=s.charAt(j)-\'0\';\n                u.append(n);\n            }\n            s=u.toString();\n        }\n        return s;\n    }\n}
['String', 'Java']